summaryrefslogtreecommitdiffhomepage
path: root/src/raymath.h
diff options
context:
space:
mode:
authorRay <[email protected]>2023-05-02 19:29:14 +0200
committerRay <[email protected]>2023-05-02 19:29:14 +0200
commit3a21301724686335c8dd79e60e051f4fc2c45a41 (patch)
treef94a6fd7f74c4a4614c99a41f9574a3e5a2024f5 /src/raymath.h
parent7d68aa686974347cefe0ef481c835e3d60bdc4b9 (diff)
downloadraylib-3a21301724686335c8dd79e60e051f4fc2c45a41.tar.gz
raylib-3a21301724686335c8dd79e60e051f4fc2c45a41.zip
ADDED: Comment about Matrix conventions
Diffstat (limited to 'src/raymath.h')
-rw-r--r--src/raymath.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/raymath.h b/src/raymath.h
index ddc3f58a..fa72400d 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -3,6 +3,11 @@
* raymath v1.5 - Math functions to work with Vector2, Vector3, Matrix and Quaternions
*
* CONVENTIONS:
+* - Matrix structure is defined as row-major (memory layout) but parameters naming AND all
+* math operations performed by the library consider the structure as it was column-major
+* It is like transposed versions of the matrices are used for all the maths
+* It benefits some functions making them cache-friendly and also avoids matrix
+* transpositions sometimes required by OpenGL
* - 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)