1.0.2: Fix default generic params.
This commit is contained in:
parent
a4662ebf0a
commit
9cdf152ec7
2 changed files with 5 additions and 2 deletions
|
@ -807,7 +807,7 @@ proc ortho*[T](left, right, bottom, top, near, far: T): GMat4[T] =
|
||||||
result[3, 2] = -(far + near) / fn
|
result[3, 2] = -(far + near) / fn
|
||||||
result[3, 3] = 1
|
result[3, 3] = 1
|
||||||
|
|
||||||
proc lookAt*[T](eye, center: GVec3[T], up = [T(0), 0, 1]): GMat4[T] =
|
proc lookAt*[T](eye, center, up: GVec3[T]): GMat4[T] =
|
||||||
let
|
let
|
||||||
eyex = eye[0]
|
eyex = eye[0]
|
||||||
eyey = eye[1]
|
eyey = eye[1]
|
||||||
|
@ -887,6 +887,9 @@ proc lookAt*[T](eye, center: GVec3[T], up = [T(0), 0, 1]): GMat4[T] =
|
||||||
result[3, 2] = -(z0 * eyex + z1 * eyey + z2 * eyez)
|
result[3, 2] = -(z0 * eyex + z1 * eyey + z2 * eyez)
|
||||||
result[3, 3] = 1
|
result[3, 3] = 1
|
||||||
|
|
||||||
|
proc lookAt*[T](eye, center: GVec3[T]): GMat4[T] =
|
||||||
|
lookAt(eye, center, [T(0), 0, 1])
|
||||||
|
|
||||||
proc angle*[T](a: GVec2[T]): T =
|
proc angle*[T](a: GVec2[T]): T =
|
||||||
## Angle of a Vec2.
|
## Angle of a Vec2.
|
||||||
arctan2(a.y, a.x)
|
arctan2(a.y, a.x)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
author = "treeform"
|
author = "treeform"
|
||||||
description = "Your single stop for vector math routines for 2d and 3d graphics."
|
description = "Your single stop for vector math routines for 2d and 3d graphics."
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
Loading…
Reference in a new issue