def __mul__(self, other):
        """Multiply a Vector4 and a scalar."""
        if isinstance(other, numbers.Number):
            vec4 = Vector4()
            vec4.x = self.x * other
            vec4.y = self.y * other
            vec4.z = self.z * other
            vec4.w = self.w * other
            return vec4
        else:
            raise TypeError("other must be a single number")
def __mul__ ( self , other ) : if isinstance ( other , numbers . Number ) : vec4 = Vector4 ( ) vec4 . x = self . x * other vec4 . y = self . y * other vec4 . z = self . z * other vec4 . w = self . w * other return vec4 else : raise TypeError ( "other must be a single number" )
Multiply a Vector4 and a scalar.