A vector of form (x,y).
![]() | A vector of form (x,y). |
![]() | The x component. |
![]() | The y component. |
![]() | Specifies a compile-time constant float2 with value (0, 0). |
![]() | Specifies a compile-time constant float2 with value (1, 1). |
![]() | Specifies a compile-time constant float2 with value (1, 0). |
![]() | Specifies a compile-time constant float2 with value (0, 1). |
![]() | A compile-time constant float2 with value (NaN, NaN). |
![]() | A compile-time constant float2 with value (+infinity, +infinity). |
![]() | The default constructor does not initialize any members of this class. |
![]() | Casts this float2 to a C array. |
![]() | Accesses an element of this vector using array notation. |
![]() | Accesses an element of this vector. |
![]() | Adds two vectors. |
![]() | Adds a vector to this vector, in-place. |
![]() | Adds a vector to this vector. |
![]() | Performs a 2D swizzled access to this vector. |
![]() | Performs a swizzled access to this vector. |
![]() | Fills each entry of this float2 by the given scalar. |
![]() | Sets all elements of this vector. |
![]() | Converts the given vector represented in polar coordinates to an euclidean float2 (x,y) pair. |
![]() | Converts this euclidean (x,y) float2 to polar coordinates representation in the form (theta, length). |
![]() | Returns the aimed angle direction of this vector, in radians. |
![]() | Computes the length of this vector. |
![]() | Computes the squared length of this vector. |
![]() | Normalizes this float2. |
![]() | Returns a normalized copy of this vector. |
![]() | Scales this vector so that its new length is as given. |
![]() | Returns a scaled copy of this vector which has its new length as given. |
![]() | Tests if the length of this vector is one, up to the given epsilon. |
![]() | Tests if this is the null vector, up to the given epsilon. |
![]() | Tests if this vector contains valid finite elements. |
![]() | Tests if two vectors are perpendicular to each other. |
![]() | Tests if two vectors are equal, up to the given epsilon. |
![]() | Compares whether this float2 and the given float2 are identical bit-by-bit in the underlying representation. |
![]() | Returns "(x, y)". |
![]() | Returns "x,y". This is the preferred format for the float2 if it has to be serialized to a string for machine transfer. |
![]() | Returns a string of C++ code that can be used to construct this object. Useful for generating test cases from badly behaving objects. |
![]() | Returns x + y. |
![]() | Returns x * y. |
![]() | Returns (x+y)/2. |
![]() | Returns min(x, y). |
![]() | Returns the index that has the smallest value in this vector. |
![]() | Returns max(x, y). |
![]() | Returns the index that has the smallest value in this vector. |
![]() | Takes the element-wise absolute value of this vector. |
![]() | Returns a copy of this vector with each element negated. |
![]() | Computes the element-wise reciprocal of this vector. |
![]() | Returns an element-wise minimum of this and the vector (ceil, ceil, ceil). |
![]() | Returns an element-wise maximum of this and the vector (floor, floor, floor). |
![]() | Returns a vector that has floor <= this[i] <= ceil for each element. |
![]() | Limits each element of this vector in the range [0, 1]. |
![]() | Computes the distance between this and the given float2. |
![]() | Computes the squared distance between this and the given point. |
![]() | Computes the dot product of this and the given vector. |
![]() | Returns this vector with the "perp" operator applied to it. |
![]() | Computes the perp-dot product of this and the given float2 in the order this^perp (dot) rhs. |
![]() | Rotates this vector 90 degrees clock-wise. |
![]() | Returns a vector that is perpendicular to this vector (rotated 90 degrees clock-wise). |
![]() | Rotates this vector 90 degrees counterclock-wise . |
![]() | Returns a vector that is perpendicular to this vector (rotated 90 degrees counter-clock-wise). |
![]() | Returns this vector reflected about a plane with the given normal. |
![]() | Refracts this vector about a plane with the given normal. |
![]() | Projects this vector onto the given unnormalized direction vector. |
![]() | Projects this vector onto the given normalized direction vector. |
![]() | Returns the angle between this vector and the specified vector, in radians. |
![]() | Returns the angle between this vector and the specified normalized vector, in radians. |
![]() | Breaks this vector down into parallel and perpendicular components with respect to the given direction. |
![]() | Linearly interpolates between this and the vector b. |
![]() | Generates a new float2 by filling its entries by the given scalar. |
![]() | |
![]() | Parses a string that is of form "x,y" or "(x,y)" or "(x;y)" or "x y" to a new float2. |
![]() | This function is the same as calling a.Lerp(b, t). |
![]() | Makes the given vectors linearly independent. |
![]() | Returns true if the given vectors are orthogonal to each other. |
![]() | Makes the given vectors linearly independent and normalized in length. |
![]() | Tests if the triangle a->b->c is oriented counter-clockwise. |
![]() | Computes the 2D convex hull of the given point set. |
![]() | Computes the 2D convex hull of the given point set, in-place. |
![]() | Tests whether a 2D convex hull contains the given point. |
![]() | Computes the minimum-area rectangle that bounds the given point set. [noscript]. |
![]() | Generates a direction vector of the given length pointing at a uniformly random direction. |
![]() | Returns a random float3 with each entry randomized between the range [minElem, maxElem]. |