Back to class index
| float2::Add/Sub/Mul/DivSyntaxfloat2 float2::Add(const float2 &v) const; [1 line of code]Adds a vector to this vector. Return Value(x+v.x, y+v.y). Syntaxfloat2 float2::Add(float s) const; [4 lines of code]Adds the vector (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). Syntaxfloat2 float2::Sub(const float2 &v) const; [1 line of code]Subtracts a vector from this vector. Return Value(x-v.x, y-v.y). Syntaxfloat2 float2::Sub(float s) const; [4 lines of code]Subtracts the vector (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). Syntaxfloat2 float2::SubLeft(float s) const; [4 lines of code]Subtracts this vector from the vector (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). Syntaxfloat2 float2::Mul(const float2 &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). Syntaxfloat2 float2::Mul(float s) const; [1 line of code]Multiplies this vector by a scalar. Return Value(x*s, y*s). Syntaxfloat2 float2::Div(const float2 &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). Syntaxfloat2 float2::Div(float s) const; [1 line of code]Divides this vector by a scalar. Return Value(x/s, y/s). Syntaxfloat2 float2::DivLeft(float s) const; [4 lines of code]Divides the vector (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). |