Kanzi  3.9.7
Kanzi Engine API
vector2.hpp File Reference

Classes

class  kanzi::Vector2
 Vector with 2 floating point components: (x, y). More...
 

Namespaces

 kanzi
 Easing functions that require external dependencies for calculation.
 

Functions

Vector2 kanzi::componentAbs (Vector2 v)
 Calculates component-wise absolute value for all elements and returns resulting vector. More...
 
Vector2 kanzi::componentAdd (Vector2 v, float scalar)
 Adds a value to all elements of a vector and returns the result. More...
 
bool kanzi::componentAllGreaterThan (Vector2 a, Vector2 b)
 Returns whether each component of the first vector is greater than the corresponding component of the second vector. More...
 
bool kanzi::componentAllGreaterThanOrEqual (Vector2 a, Vector2 b)
 Returns whether each component of the first vector is greater than or equal to the corresponding component of the second vector. More...
 
bool kanzi::componentAllLessThan (Vector2 a, Vector2 b)
 Returns whether each component of the first vector is less than the corresponding component of the second vector. More...
 
bool kanzi::componentAllLessThanOrEqual (Vector2 a, Vector2 b)
 Returns whether each component of the first vector is less than or equal to the corresponding component of the second vector. More...
 
Vector2 kanzi::componentCeil (Vector2 v)
 Calculates component-wise ceil value for all elements and returns resulting vector. More...
 
Vector2 kanzi::componentFloor (Vector2 v)
 Calculates component-wise floor value for all elements and returns resulting vector. More...
 
Vector2 kanzi::componentRound (Vector2 v)
 Calculates component-wise rounded value for all elements and returns resulting vector. More...
 
Vector2 kanzi::componentSqrt (Vector2 v)
 Calculates component-wise square root all elements and returns resulting vector. More...
 
Vector2 kanzi::componentSubtract (Vector2 v, float scalar)
 Subtracts a value from all elements of a vector and returns the result. More...
 
Vector2 kanzi::componentWiseDivide (Vector2 v1, Vector2 v2)
 Divides all vector elements component-wise and returns the resulting vector. More...
 
Vector2 kanzi::componentWiseMax (Vector2 v1, Vector2 v2)
 Calculates the component-wise maximum for all vector elements and returns the resulting vector. More...
 
Vector2 kanzi::componentWiseMin (Vector2 v1, Vector2 v2)
 Calculates the component-wise minimum for all vector elements and returns the resulting vector. More...
 
Vector2 kanzi::componentWiseMultiply (Vector2 v1, Vector2 v2)
 Multiplies all vector elements component-wise and returns the resulting vector. More...
 
Vector2 kanzi::componentWiseRemainder (Vector2 v1, Vector2 v2)
 Calculates component-wise the remainder for all vector elements and returns the resulting vector. More...
 
float kanzi::dotProduct (Vector2 v1, Vector2 v2)
 Calculates the dot product of two vectors. More...
 
bool kanzi::isfinite (Vector2 vec)
 Overloading of std::isfinite for kanzi::Vector2. More...
 
bool kanzi::operator!= (Vector2 v1, Vector2 v2)
 Compares two vectors for inequality. More...
 
Vector2 kanzi::operator* (Vector2 v, float scalar)
 Multiplies all vector elements with a scalar and returns the resulting vector. More...
 
Vector2 kanzi::operator* (float scalar, Vector2 v)
 Multiplies all vector elements with a scalar and returns the resulting vector. More...
 
Vector2 kanzi::operator+ (float v1, Vector2 v2)
 Adds a scalar and a vector and returns the sum. More...
 
Vector2 kanzi::operator+ (Vector2 v1, float v2)
 Adds a vector and a scalar and returns the sum. More...
 
Vector2 kanzi::operator+ (Vector2 v1, Vector2 v2)
 Adds two vectors and returns the sum. More...
 
Vector2 kanzi::operator+ (Vector2 v)
 Unary plus, doesn't do anything and returns the resulting vector. More...
 
Vector2 kanzi::operator- (Vector2 v1, Vector2 v2)
 Subtracts two vectors and returns the difference. More...
 
Vector2 kanzi::operator- (Vector2 v)
 Negates all vector elements and returns the resulting vector. More...
 
Vector2 kanzi::operator/ (Vector2 v, float scalar)
 Divides all vector elements with a scalar and returns the resulting vector. More...
 
bool kanzi::operator== (Vector2 v1, Vector2 v2)
 Compares two vectors for equality. More...
 
float kanzi::pseudoCrossProduct (const Vector2 &left, const Vector2 &right)
 Calculates pseudo-cross product of two 2D vectors. More...