Go to the source code of this file.
Data Structures | |
struct | kmVec2 |
Defines | |
#define | kmScalar float |
Functions | |
kmVec2 * | kmVec2Fill (kmVec2 *pOut, kmScalar x, kmScalar y) |
kmScalar | kmVec2Length (const kmVec2 *pIn) |
Returns the length of the vector. | |
kmScalar | kmVec2LengthSq (const kmVec2 *pIn) |
Returns the square of the length of the vector. | |
kmVec2 * | kmVec2Normalize (kmVec2 *pOut, const kmVec2 *pIn) |
Returns the vector passed in set to unit length. | |
kmVec2 * | kmVec2Add (kmVec2 *pOut, const kmVec2 *pV1, const kmVec2 *pV2) |
Adds 2 vectors and returns the result. | |
kmScalar | kmVec2Dot (const kmVec2 *pV1, const kmVec2 *pV2) |
kmVec2 * | kmVec2Subtract (kmVec2 *pOut, const kmVec2 *pV1, const kmVec2 *pV2) |
Subtracts 2 vectors and returns the result. | |
kmVec2 * | kmVec2Transform (kmVec2 *pOut, const kmVec2 *pV1, const struct kmMat4 *pM) |
kmVec2 * | kmVec2TransformCoord (kmVec2 *pOut, const kmVec2 *pV, const struct kmMat4 *pM) |
Transforms a 3D vector by a given matrix, projecting the result back into w = 1. | |
kmVec2 * | kmVec2Scale (kmVec2 *pOut, const kmVec2 *pIn, const kmScalar s) |
Scales a vector to length s. | |
int | kmVec2AreEqual (const kmVec2 *p1, const kmVec2 *p2) |
Returns 1 if both vectors are equal. |
Definition at line 33 of file vec2.c.
References kmVec2::x, and kmVec2::y.
Referenced by kazmathxx::Vec2::operator*(), kazmathxx::Vec2::operator+(), kazmathxx::Vec2::operator-(), and kazmathxx::Vec2::operator/().
kmScalar kmVec2Length | ( | const kmVec2 * | pIn | ) |
kmScalar kmVec2LengthSq | ( | const kmVec2 * | pIn | ) |
Transforms a 3D vector by a given matrix, projecting the result back into w = 1.
Transform the Vector