diff --git a/src/vmath.nim b/src/vmath.nim index 18a43e4..b8fd378 100644 --- a/src/vmath.nim +++ b/src/vmath.nim @@ -807,7 +807,7 @@ proc ortho*[T](left, right, bottom, top, near, far: T): GMat4[T] = result[3, 2] = -(far + near) / fn 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 eyex = eye[0] 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, 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 = ## Angle of a Vec2. arctan2(a.y, a.x) diff --git a/vmath.nimble b/vmath.nimble index e410a79..16d5591 100644 --- a/vmath.nimble +++ b/vmath.nimble @@ -1,4 +1,4 @@ -version = "1.0.1" +version = "1.0.2" author = "treeform" description = "Your single stop for vector math routines for 2d and 3d graphics." license = "MIT"