|
RMAPI float | Clamp (float value, float min, float max) |
|
RMAPI float | Lerp (float start, float end, float amount) |
|
RMAPI float | Normalize (float value, float start, float end) |
|
RMAPI float | Remap (float value, float inputStart, float inputEnd, float outputStart, float outputEnd) |
|
RMAPI int | FloatEquals (float x, float y) |
|
RMAPI Vector2 | Vector2Zero (void) |
|
RMAPI Vector2 | Vector2One (void) |
|
RMAPI Vector2 | Vector2Add (Vector2 v1, Vector2 v2) |
|
RMAPI Vector2 | Vector2AddValue (Vector2 v, float add) |
|
RMAPI Vector2 | Vector2Subtract (Vector2 v1, Vector2 v2) |
|
RMAPI Vector2 | Vector2SubtractValue (Vector2 v, float sub) |
|
RMAPI float | Vector2Length (Vector2 v) |
|
RMAPI float | Vector2LengthSqr (Vector2 v) |
|
RMAPI float | Vector2DotProduct (Vector2 v1, Vector2 v2) |
|
RMAPI float | Vector2Distance (Vector2 v1, Vector2 v2) |
|
RMAPI float | Vector2DistanceSqr (Vector2 v1, Vector2 v2) |
|
RMAPI float | Vector2Angle (Vector2 v1, Vector2 v2) |
|
RMAPI Vector2 | Vector2Scale (Vector2 v, float scale) |
|
RMAPI Vector2 | Vector2Multiply (Vector2 v1, Vector2 v2) |
|
RMAPI Vector2 | Vector2Negate (Vector2 v) |
|
RMAPI Vector2 | Vector2Divide (Vector2 v1, Vector2 v2) |
|
RMAPI Vector2 | Vector2Normalize (Vector2 v) |
|
RMAPI Vector2 | Vector2Transform (Vector2 v, Matrix mat) |
|
RMAPI Vector2 | Vector2Lerp (Vector2 v1, Vector2 v2, float amount) |
|
RMAPI Vector2 | Vector2Reflect (Vector2 v, Vector2 normal) |
|
RMAPI Vector2 | Vector2Rotate (Vector2 v, float angle) |
|
RMAPI Vector2 | Vector2MoveTowards (Vector2 v, Vector2 target, float maxDistance) |
|
RMAPI Vector2 | Vector2Invert (Vector2 v) |
|
RMAPI Vector2 | Vector2Clamp (Vector2 v, Vector2 min, Vector2 max) |
|
RMAPI Vector2 | Vector2ClampValue (Vector2 v, float min, float max) |
|
RMAPI int | Vector2Equals (Vector2 p, Vector2 q) |
|
RMAPI Vector3 | Vector3Zero (void) |
|
RMAPI Vector3 | Vector3One (void) |
|
RMAPI Vector3 | Vector3Add (Vector3 v1, Vector3 v2) |
|
RMAPI Vector3 | Vector3AddValue (Vector3 v, float add) |
|
RMAPI Vector3 | Vector3Subtract (Vector3 v1, Vector3 v2) |
|
RMAPI Vector3 | Vector3SubtractValue (Vector3 v, float sub) |
|
RMAPI Vector3 | Vector3Scale (Vector3 v, float scalar) |
|
RMAPI Vector3 | Vector3Multiply (Vector3 v1, Vector3 v2) |
|
RMAPI Vector3 | Vector3CrossProduct (Vector3 v1, Vector3 v2) |
|
RMAPI Vector3 | Vector3Perpendicular (Vector3 v) |
|
RMAPI float | Vector3Length (const Vector3 v) |
|
RMAPI float | Vector3LengthSqr (const Vector3 v) |
|
RMAPI float | Vector3DotProduct (Vector3 v1, Vector3 v2) |
|
RMAPI float | Vector3Distance (Vector3 v1, Vector3 v2) |
|
RMAPI float | Vector3DistanceSqr (Vector3 v1, Vector3 v2) |
|
RMAPI float | Vector3Angle (Vector3 v1, Vector3 v2) |
|
RMAPI Vector3 | Vector3Negate (Vector3 v) |
|
RMAPI Vector3 | Vector3Divide (Vector3 v1, Vector3 v2) |
|
RMAPI Vector3 | Vector3Normalize (Vector3 v) |
|
RMAPI void | Vector3OrthoNormalize (Vector3 *v1, Vector3 *v2) |
|
RMAPI Vector3 | Vector3Transform (Vector3 v, Matrix mat) |
|
RMAPI Vector3 | Vector3RotateByQuaternion (Vector3 v, Quaternion q) |
|
RMAPI Vector3 | Vector3Lerp (Vector3 v1, Vector3 v2, float amount) |
|
RMAPI Vector3 | Vector3Reflect (Vector3 v, Vector3 normal) |
|
RMAPI Vector3 | Vector3Min (Vector3 v1, Vector3 v2) |
|
RMAPI Vector3 | Vector3Max (Vector3 v1, Vector3 v2) |
|
RMAPI Vector3 | Vector3Barycenter (Vector3 p, Vector3 a, Vector3 b, Vector3 c) |
|
RMAPI Vector3 | Vector3Unproject (Vector3 source, Matrix projection, Matrix view) |
|
RMAPI float3 | Vector3ToFloatV (Vector3 v) |
|
RMAPI Vector3 | Vector3Invert (Vector3 v) |
|
RMAPI Vector3 | Vector3Clamp (Vector3 v, Vector3 min, Vector3 max) |
|
RMAPI Vector3 | Vector3ClampValue (Vector3 v, float min, float max) |
|
RMAPI int | Vector3Equals (Vector3 p, Vector3 q) |
|
RMAPI Vector3 | Vector3Refract (Vector3 v, Vector3 n, float r) |
|
RMAPI float | MatrixDeterminant (Matrix mat) |
|
RMAPI float | MatrixTrace (Matrix mat) |
|
RMAPI Matrix | MatrixTranspose (Matrix mat) |
|
RMAPI Matrix | MatrixInvert (Matrix mat) |
|
RMAPI Matrix | MatrixIdentity (void) |
|
RMAPI Matrix | MatrixAdd (Matrix left, Matrix right) |
|
RMAPI Matrix | MatrixSubtract (Matrix left, Matrix right) |
|
RMAPI Matrix | MatrixMultiply (Matrix left, Matrix right) |
|
RMAPI Matrix | MatrixTranslate (float x, float y, float z) |
|
RMAPI Matrix | MatrixRotate (Vector3 axis, float angle) |
|
RMAPI Matrix | MatrixRotateX (float angle) |
|
RMAPI Matrix | MatrixRotateY (float angle) |
|
RMAPI Matrix | MatrixRotateZ (float angle) |
|
RMAPI Matrix | MatrixRotateXYZ (Vector3 ang) |
|
RMAPI Matrix | MatrixRotateZYX (Vector3 ang) |
|
RMAPI Matrix | MatrixScale (float x, float y, float z) |
|
RMAPI Matrix | MatrixFrustum (double left, double right, double bottom, double top, double near, double far) |
|
RMAPI Matrix | MatrixPerspective (double fovy, double aspect, double near, double far) |
|
RMAPI Matrix | MatrixOrtho (double left, double right, double bottom, double top, double near, double far) |
|
RMAPI Matrix | MatrixLookAt (Vector3 eye, Vector3 target, Vector3 up) |
|
RMAPI float16 | MatrixToFloatV (Matrix mat) |
|
RMAPI Quaternion | QuaternionAdd (Quaternion q1, Quaternion q2) |
|
RMAPI Quaternion | QuaternionAddValue (Quaternion q, float add) |
|
RMAPI Quaternion | QuaternionSubtract (Quaternion q1, Quaternion q2) |
|
RMAPI Quaternion | QuaternionSubtractValue (Quaternion q, float sub) |
|
RMAPI Quaternion | QuaternionIdentity (void) |
|
RMAPI float | QuaternionLength (Quaternion q) |
|
RMAPI Quaternion | QuaternionNormalize (Quaternion q) |
|
RMAPI Quaternion | QuaternionInvert (Quaternion q) |
|
RMAPI Quaternion | QuaternionMultiply (Quaternion q1, Quaternion q2) |
|
RMAPI Quaternion | QuaternionScale (Quaternion q, float mul) |
|
RMAPI Quaternion | QuaternionDivide (Quaternion q1, Quaternion q2) |
|
RMAPI Quaternion | QuaternionLerp (Quaternion q1, Quaternion q2, float amount) |
|
RMAPI Quaternion | QuaternionNlerp (Quaternion q1, Quaternion q2, float amount) |
|
RMAPI Quaternion | QuaternionSlerp (Quaternion q1, Quaternion q2, float amount) |
|
RMAPI Quaternion | QuaternionFromVector3ToVector3 (Vector3 from, Vector3 to) |
|
RMAPI Quaternion | QuaternionFromMatrix (Matrix mat) |
|
RMAPI Matrix | QuaternionToMatrix (Quaternion q) |
|
RMAPI Quaternion | QuaternionFromAxisAngle (Vector3 axis, float angle) |
|
RMAPI void | QuaternionToAxisAngle (Quaternion q, Vector3 *outAxis, float *outAngle) |
|
RMAPI Quaternion | QuaternionFromEuler (float pitch, float yaw, float roll) |
|
RMAPI Vector3 | QuaternionToEuler (Quaternion q) |
|
RMAPI Quaternion | QuaternionTransform (Quaternion q, Matrix mat) |
|
RMAPI int | QuaternionEquals (Quaternion p, Quaternion q) |
|
raymath v1.5 - Math functions to work with Vector2, Vector3, Matrix and Quaternions
CONFIGURATION:
#define RAYMATH_IMPLEMENTATION Generates the implementation of the library into the included file. If not defined, the library is in header only mode and can be included in other headers or source files without problems. But only ONE file should hold the implementation.
#define RAYMATH_STATIC_INLINE Define static inline functions code, so #include header suffices for use. This may use up lots of memory.
CONVENTIONS:
- Functions are always self-contained, no function use another raymath function inside, required code is directly re-implemented inside
- Functions input parameters are always received by value (2 unavoidable exceptions)
- Functions use always a "result" variable for return
- Functions are always defined inline
- Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
LICENSE: zlib/libpng
Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
This software is provided "as-is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.
Definition at line 69 of file raymath.h.