@@ -14,7 +14,7 @@ Supports c, cpp and js backend.
1414
1515## About
1616
17- Your one stop shop for vector math routines for 2d and 3d graphics.
17+ Your one stop shop for vector math routines for 2D and 3D graphics.
1818
1919* Pure Nim with no dependencies.
2020* Very similar to GLSL Shader Language with extra stuff.
@@ -42,7 +42,7 @@ float64 | double | DVec2 | DVec3 | DVec4 | DMat3 | DMat4 | DQuat |
4242
4343## 2D & 3D matrix math
4444
45- You can combine and create 2d and 3d matrices by passing 2d or 3d vectors to matrix functions:
45+ You can combine and create 2D and 3D matrices by passing 2D or 3D vectors to matrix functions:
4646
4747``` nim
4848let mat2d = translate(vec2(10, 20)) * rotate(45.toRadians) * scale(vec2(2))
@@ -63,15 +63,14 @@ quat(1.0, 2.0, 3.0, 4.0) ~= quat(1.0, 2.0, 3.0, 4.0)
6363
6464* ` between ` - Returns true if value is between min and max or equal to them.
6565* ` sign ` - Returns the sign of a number, -1 or 1.
66- * ` quantize ` - Makes v be a multiple of n. Rounding to integer quantize by 1.0.
67- * ` fractional ` - Returns fractional part of a number. 3.14 -> 0.14
66+ * ` quantize ` - Makes v be a multiple of n. Rounding to integer quantizes by 1.0.
6867* ` lerp ` - Interpolates value between a and b.
6968
7069## Angle functions
7170
72- * ` fixAngle ` - Make angle be from -PI to PI radians.
73- * ` angleBetween ` - Find the angle between angle a and angle b.
74- * ` turnAngle ` - Move from angle a to angle b with step of v.
71+ * ` fixAngle ` - Makes angle be from -PI to PI radians.
72+ * ` angleBetween ` - Finds the angle between angle a and angle b.
73+ * ` turnAngle ` - Moves from angle a to angle b with step of v.
7574
7675## Vector and matrix representation and benchmarks.
7776
@@ -93,11 +92,11 @@ vmathObjArrayBased ................ 73.968 ms 74.292 ms ±0.631 x100
9392
9493## Zmod - GLSL mod
9594
96- GLSL uses a different type of float point mod. Because mod is a Nim keyword please use ` zmod ` when you need GLSL ` mod ` behavior.
95+ GLSL uses a different type of float point mod. Because mod is a Nim keyword, please use ` zmod ` when you need GLSL ` mod ` behavior.
9796
9897## Coordinate System
9998
100- Right-hand z -forward coordinate system
99+ Right-hand Z -forward coordinate system
101100
102101This is the same system used in the GLTF file format.
103102
@@ -124,18 +123,18 @@ OpenGL/GLSL/vmath vs Math/Specification notation:
124123```
125124
126125# 1.x.x to 2.0.0 vmath breaking changes:
127- * New right-hand-z -forward cordate system and functions that care about
128- coordinate system where moved there.
129- * deprecated ` lookAt() ` please use ` toAngles() ` /` fromAngles() ` instead.
130- * deprecated ` fractional() ` use ` frac() ` instead.
126+ * New right-hand-Z -forward coordinate system and functions that care about
127+ coordinate system were moved there.
128+ * Deprecated ` lookAt() ` , please use ` toAngles() ` /` fromAngles() ` instead.
129+ * Deprecated ` fractional() ` , use ` frac() ` instead.
131130
132131# 0.x.x to 1.0.0 vmath breaking changes:
133132
134- * ` vec3(v) ` no longer works please use ` vec3(v.x, v.y, 0) ` instead.
135- * ` vec3(v, 0) ` no longer works please use ` vec3(v.x, v.y, 0) ` instead.
136- * ` 2 * v ` no longer works due to more vec types please use ` v * 2 ` instead.
133+ * ` vec3(v) ` no longer works, please use ` vec3(v.x, v.y, 0) ` instead.
134+ * ` vec3(v, 0) ` no longer works, please use ` vec3(v.x, v.y, 0) ` instead.
135+ * ` 2 * v ` no longer works due to more vec types, please use ` v * 2 ` instead.
137136* ` m[15] ` no longer works because matrices are now m[ x, y] .
138- * Concept of 3x3 rotation 3d matrix was removed.
137+ * Concept of 3x3 rotation 3D matrix was removed.
139138* ` angleBetween ` got renamed to ` angle(a, b) `
140139* ` scaleMat ` got renamed to ` scale(v) `
141140* ` rotationMat3 ` got renamed to ` rotate(x) `
0 commit comments