Back to class index
| float3::Add/Sub/Mul/DivSyntaxfloat3 float3::Add(const float3 &v) const; [1 line of code]Adds a vector to this vector. Return Value(x+v.x, y+v.y, z+v.z). Syntaxfloat3 float3::Add(float s) const; [4 lines of code]Adds the vector (s,s,s) to this vector. Note Mathematically, the addition of a vector and scalar is not defined in linear space structures, but this function is provided here for syntactical convenience. Return Value(x+s, y+s, z+s). Syntaxfloat3 float3::Sub(const float3 &v) const; [1 line of code]Subtracts a vector from this vector. Return Value(x-v.x, y-v.y, z-v.z). Syntaxfloat3 float3::Sub(float s) const; [4 lines of code]Subtracts the vector (s,s,s) from this vector. Note Mathematically, the subtraction of a vector by a scalar is not defined in linear space structures, but this function is provided here for syntactical convenience. Return Value(x-s, y-s, z-s). Syntaxfloat3 float3::SubLeft(float s) const; [4 lines of code]Subtracts this vector from the vector (s,s,s). Note Mathematically, the subtraction of a scalar by a vector is not defined in linear space structures, but this function is provided here for syntactical convenience. Return Value(s-x, s-y, s-z). Syntaxfloat3 float3::Mul(const float3 &v) const; [4 lines of code]Multiplies this vector by a vector, element-wise. Note Mathematically, the multiplication of two vectors is not defined in linear space structures, but this function is provided here for syntactical convenience. Return Value(x*v.x, y*v.y, z*v.z). Syntaxfloat3 float3::Mul(float s) const; [1 line of code]Multiplies this vector by a scalar. Return Value(x*s, y*s, z*s). Syntaxfloat3 float3::Div(const float3 &v) const; [4 lines of code]Divides this vector by a vector, element-wise. Note Mathematically, the division of two vectors is not defined in linear space structures, but this function is provided here for syntactical convenience. Return Value(x/v.x, y/v.y, z/v.z). Syntaxfloat3 float3::Div(float s) const; [1 line of code]Divides this vector by a scalar. Return Value(x/s, y/s, z/s). Syntaxfloat3 float3::DivLeft(float s) const; [4 lines of code]Divides the vector (s,s,s) by this vector, element-wise. Note Mathematically, the division of a scalar by a vector is not defined in linear space structures, but this function is provided here for syntactical convenience. Return Value(s/x, s/y, s/z). |