treeform
3c138bb23d
Add inversesqrt, vec boolean, and mix functions from glsl.
2022-04-01 10:11:45 -07:00
treeform
cba483c057
Fix #51 - Better doc generation.
2022-03-18 14:36:06 -07:00
treeform
4a9f5fa397
Fix mat4.pos.
2022-01-28 20:45:04 -08:00
Ryan Oldenburg
3e78d218a5
trunc instead of floor
2021-12-03 14:18:03 -06:00
Ryan Oldenburg
0e33227e90
not needed
2021-11-23 16:28:15 -06:00
treeform
98f8485ff0
Fix https://github.com/treeform/vmath/issues/44
2021-11-20 22:14:44 -08:00
treeform
b11891e6ec
func -> template
2021-11-20 22:14:33 -08:00
treeform
666abd8c83
Merge pull request #46 from treeform/swizzle2
...
Add template based swizzle
2021-11-20 22:09:50 -08:00
treeform
c15614ec2c
Add tempalte based swizzle to work around https://github.com/nim-lang/Nim/issues/13063
2021-11-20 09:55:10 -08:00
treeform
87325778b7
Merge branch 'master' of github.com:treeform/vmath
2021-10-26 08:36:22 -07:00
treeform
f9f41a5bb2
Add pos setter and getter to mat4.
2021-10-26 08:36:19 -07:00
Ryan Oldenburg
81041ac712
add some vector conversions
2021-10-11 20:45:10 -05:00
treeform
47891e35d2
Add mat3.determinant and use it in inverse().
2021-10-04 12:44:27 -07:00
Andre von Houck
fa66fc6538
Small change.
2021-09-26 21:46:49 -07:00
Ryan Oldenburg
7b55ea0b12
1.0.11 Mat3 bycopy
2021-09-05 12:23:07 -05:00
treeform
522bbf3bc0
Depricate lerp use mix, add mod and zmod.
2021-07-15 22:28:16 -07:00
treeform
f711a5ff6d
Add Swizzle to all Vecs. ( #39 )
...
* Add swizzle based on macro.
* More constructors.
* Make it work with shady.
* Morepretty.
* Add ray tracer output.
* Better typePrefix that works with all vector layouts.
2021-07-12 20:07:40 -07:00
treeform
9196bbfe81
Fix minor issues with Apple M1.
2021-07-11 06:25:13 -07:00
treeform
0a29d51639
Add mat3 * vec3.
2021-07-06 08:50:39 -07:00
treeform
9b9f8f525e
Add some more matrix * vector operatoins.
2021-07-05 09:54:23 -07:00
treeform
d0aace4c93
Add min/max functions for vectors.
2021-06-11 08:02:30 -07:00
Ryan Oldenburg
7f4545b241
faster == and !=
2021-06-05 00:31:19 -05:00
treeform
43f9875df8
Change readme. Allow toRad/deg take integers.
2021-05-29 11:24:48 -07:00
treeform
693002bacd
1.0.8: Fix and bench isNan.
2021-05-29 10:55:46 -07:00
treeform
b355ff2a28
Merge branch 'master' of github.com:treeform/vmath
2021-05-29 09:29:39 -07:00
treeform
a2c0da6255
1.0.7 - Add $ to everything, add isNaN.
2021-05-29 09:29:36 -07:00
Elliot Waite
31d1e05d98
Fix error message ( #35 )
2021-05-28 23:08:39 -07:00
treeform
feca07ded9
Fix #34 : ortho(), add tests.
2021-05-08 11:09:22 -07:00
treeform
2acbf2a3c3
Fix issue with rotate matrixes.
2021-05-08 11:01:17 -07:00
treeform
6db149a2be
Add 3 different vector/matrix representations. ( #32 )
...
* Add -d:vmathArrayBased to go to array vectors (slow).
* Add -d:vmathObjBased to go to object vectors (faster).
* Add default or just add -d:vmathObjArrayBased to go to object-array vectors (fastest).
Current speed test (using pixie, your results may vary):
```
nim c -r -d:release -d:vmathArrayBased .\tests\benchmark_svg.nim
svg decode ........................ 31.543 ms 38.110 ms ±5.531 x1000
nim c -r -d:release -d:vmathObjBased .\tests\benchmark_svg.nim
svg decode ........................ 25.620 ms 33.569 ms ±6.328 x1000
nim c -r -d:release .\tests\benchmark_svg.nim
svg decode ........................ 25.746 ms 33.059 ms ±5.666 x1000
```
2021-05-08 11:00:29 -07:00
Ryan Oldenburg
322c4f6a98
1.0.4 mat3.pos=
2021-04-27 20:26:39 -05:00
treeform
19eb9dd330
1.0.3: Add fractional, speed up lerp.
2021-04-18 16:50:48 -07:00
treeform
9cdf152ec7
1.0.2: Fix default generic params.
2021-03-26 15:33:36 -07:00
treeform
a4662ebf0a
Fix bug with perspective and add back nlerp.
2021-03-26 15:16:36 -07:00
treeform
0f80873e58
vmath 1.0.0 - Breaking Changes. ( #29 )
...
# Added a bunch of new types:
Type | Constructor | Description
------|-------------| ---------------------------------------------------
BVec# | bvec# | a vector of booleans
IVec# | ivec# | a vector of signed integers
UVec# | uvec# | a vector of unsigned integers
Vec# | vec# | a vector of single-precision floating-point numbers
DVec# | dvec# | a vector of double-precision floating-point numbers
## And these types:
NIM | GLSL | 2 | 3 | 4 | 9 | 16 | 4 |
--------|--------|-------|-------|-------|-------|-------|-------|
bool | bool | BVec2 | BVec3 | BVec4 | | | |
int32 | int | IVec2 | IVec3 | IVec4 | | | |
uint32 | uint | UVec2 | UVec3 | UVec4 | | | |
float32 | float | Vec2 | Vec3 | Vec4 | Mat3 | Mat4 | Quat |
float64 | double | DVec2 | DVec3 | DVec4 | DMat3 | DMat4 | DQuat |
# 0.x.x to 1.0.0 vmath breaking changes:
* `vec3(v)` no longer works please use `vec3(v.x, v.y, 0)` instead.
* `vec3(v, 0)` no longer works please use `vec3(v.x, v.y, 0)` instead.
* `2 * v` no longer works due to more vec types please use `v * 2` instead.
* `m[15]` no longer works because matrices are now m[x, y].
* Concept of 3x3 rotation 3d matrix was removed.
* `angleBetween` got renamed to `angle(a, b)`
* `scaleMat` got renamed to `scale(v)`
* `rotationMat3` got renamed to `rotate(x)`
2021-03-26 13:58:21 -07:00
treeform
4cb11b87b0
Make sure every type has a hash.
2021-02-28 11:02:59 -08:00
treeform
437f3cc604
0.5.0 - remove inRect, add ~=, change tests.
2021-02-27 21:49:31 -08:00
treeform
f01e2bfb54
Add mat3.pos.
2021-02-25 16:43:00 -08:00
treeform
23e88bb951
Merge pull request #26 from elliotwaite/patch-1
...
Fix zx proc
2021-01-06 19:09:22 -08:00
Ryan Oldenburg
e8b53ab066
0.4.1 add missing floor, ceil, round
2021-01-06 19:55:45 -06:00
treeform
747262f4e3
Change from template to proc.
2021-01-01 20:14:29 -08:00
Elliot Waite
4a07ed16f3
Fix zx proc
2020-12-17 14:42:35 -08:00
treeform
21dbb2b908
Convert [] from template to inline.
2020-12-15 00:07:36 -08:00
Ryan Oldenburg
0cc7672076
remove rect
2020-12-10 17:14:35 -06:00
Ryan Oldenburg
1254cefe34
let
2020-11-30 12:29:53 -06:00
Ryan Oldenburg
68d2c6a585
fix
2020-11-30 12:28:25 -06:00
Ryan Oldenburg
b50b570447
shorter
2020-11-30 01:35:10 -06:00
Ryan Oldenburg
3c02a64729
formatting
2020-11-30 01:30:17 -06:00
Ryan Oldenburg
f83eb0b7b2
more clear
2020-11-30 01:07:08 -06:00
Ryan Oldenburg
19c9ef1b0b
add missing
2020-11-30 00:50:07 -06:00