From 1c46fdf600c0bdc3ef19a77ac4ab4f0cf5061442 Mon Sep 17 00:00:00 2001 From: ventor3000 Date: Fri, 26 Jul 2013 21:18:30 +0200 Subject: Fixed stupid mistake when clamping acos --- lib/pure/basic2d.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pure/basic2d.nim b/lib/pure/basic2d.nim index e3ac4b0a1..9c327a011 100644 --- a/lib/pure/basic2d.nim +++ b/lib/pure/basic2d.nim @@ -110,7 +110,7 @@ proc safeArccos(v:float):float= ## assumes v is in range 0.0-1.0, but clamps ## the value to avoid out of domain errors ## due to rounding issues - return arccos(clamp(v,0.0,1.0)) + return arccos(clamp(v,-1.0,1.0)) template makeBinOpVector*(s:expr)= @@ -812,10 +812,10 @@ proc radToDeg*(rad:float):float= rad * RAD2DEGCONST proc bisect*(v1,v2:TVector2d):TVector2d {.noInit.}= - ## Computes the bisector between v1 and v2 as a normalize vector + ## Computes the bisector between v1 and v2 as a normalized vector ## If one of the input vectors has zero length, a normalized verison ## of the other is returned. - ## If both input vectors has zer length, an arbitrary normalize vector + ## If both input vectors has zero length, an arbitrary normalized vector ## is returned. var vmag1=v1.len -- cgit 1.4.1-2-gfad0