From 3d42a8ed2a4d6097dd04301060849cf857ac9fac Mon Sep 17 00:00:00 2001 From: lilkeet Date: Mon, 24 Jun 2024 02:14:37 -0500 Subject: [PATCH] fix generic typing bug: prev commit allowed mixing vector types in arguments like angle(vec2, vec3) --- src/vmath.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vmath.nim b/src/vmath.nim index 46d913a..1ffe55a 100644 --- a/src/vmath.nim +++ b/src/vmath.nim @@ -1573,7 +1573,7 @@ proc angle*[T](a: GVec2[T]): T = ## Angle of a Vec2. arctan2(a.y, a.x) -proc angle*[T](a, b: GVec2[T]|GVec3[T]): T = +proc angle*[T; S: GVec2[T]|GVec3[T]](a, b: S): T = ## Angle between 2 Vec2 or Vec3. runnableExamples: assert angle(vec2(0.0, 1.0), vec2(1.0, 0.0)).toDegrees() == 90.0