#include <vec2f.h>
Functions | |
Vec2f () | |
Sets {0.0f, 0.0f}. More... | |
Vec2f (KyFloat32 _x, KyFloat32 _y) | |
Vec2f (KyFloat32 *coords) | |
Sets {coords[0], coords[1]}. More... | |
void | Set (KyFloat32 _x, KyFloat32 _y) |
void | Set (const KyFloat32 *coords) |
Sets {coords[0], coords[1]}. More... | |
void | Clear () |
Sets {0.0f, 0.0f}. More... | |
Operators | |
KyFloat32 & | operator[] (KyInt32 i) |
KyFloat32 | operator[] (KyInt32 i) const |
bool | operator== (const Vec2f &v) const |
bool | operator!= (const Vec2f &v) const |
bool | operator< (const Vec2f &v) const |
x is compared first, ex: {1, 5} < {2, 0} More... | |
bool | operator> (const Vec2f &v) const |
bool | operator<= (const Vec2f &v) const |
bool | operator>= (const Vec2f &v) const |
Vec2f & | operator*= (KyFloat32 s) |
Vec2f & | operator/= (KyFloat32 d) |
Vec2f & | operator+= (const Vec2f &v) |
Vec2f & | operator-= (const Vec2f &v) |
Vec2f | operator* (KyFloat32 s) const |
Vec2f | operator/ (KyFloat32 d) const |
Vec2f | operator+ (const Vec2f &v) const |
Vec2f | operator- (const Vec2f &v) const |
Vec2f | operator- () const |
KyFloat32 | operator* (const Vec2f &v) const |
DotProduct(*this, v) More... | |
KyFloat32 | operator^ (const Vec2f &v) const |
CrossProduct(*this, v) More... | |
Length | |
KyFloat32 | GetSquareLength () const |
KyFloat32 | GetLength () const |
KyFloat32 | Normalize () |
KyFloat32 | GetNormalized (Vec2f &normalized) const |
Vec2f | GetNormalized () const |
Length Shorter Names | |
KyFloat32 | SqLength () const |
KyFloat32 | Length () const |
Vec2f | Dir () const |
Rotation | |
Vec2f | PerpCW () const |
Rotates by 90 degrees clockwise. More... | |
Vec2f | PerpCCW () const |
Rotates by 90 degrees counter-clockwise. More... | |
void | RotateCCW (KyFloat32 cosAngle, KyFloat32 sinAngle) |
Vec2f | GetRotatedCCW (KyFloat32 cosAngle, KyFloat32 sinAngle) const |
Offset | |
Vec2f | OffsetX (KyFloat32 dx) const |
Returns {x + dx, y}. More... | |
Vec2f | OffsetY (KyFloat32 dy) const |
Returns {x, y + dy}. More... | |
Vec2f | Offset (KyFloat32 dx, KyFloat32 dy) const |
Returns {x + dx, y + dy}. More... | |
Zero | |
bool | IsZero () const |
static Vec2f | Zero () |
Returns {0.0f, 0.0f}. More... | |
Unit | |
static Vec2f | UnitX () |
Returns {1.0f, 0.0f}. More... | |
static Vec2f | UnitY () |
Returns {0.0f, 1.0f}. More... | |
Data | |
KyFloat32 | x |
KyFloat32 | y |
|
inline |
Sets {0.0f, 0.0f}.
|
inlineexplicit |
Sets {coords[0], coords[1]}.
|
inline |
Sets {0.0f, 0.0f}.
|
inline |
x is compared first, ex: {1, 5} < {2, 0}
|
inline |
Rotates by 90 degrees counter-clockwise.
|
inline |
Rotates by 90 degrees clockwise.
|
inline |
Sets {coords[0], coords[1]}.
|
inlinestatic |
Returns {1.0f, 0.0f}.
|
inlinestatic |
Returns {0.0f, 1.0f}.
|
inlinestatic |
Returns {0.0f, 0.0f}.