diff options
author | ventor3000 <r.k.persson@gmail.com> | 2013-07-26 21:18:30 +0200 |
---|---|---|
committer | ventor3000 <r.k.persson@gmail.com> | 2013-07-26 21:18:30 +0200 |
commit | 1c46fdf600c0bdc3ef19a77ac4ab4f0cf5061442 (patch) | |
tree | 4bdcd032e0a011d3ee58994bf4d5699afcc2fb07 /lib/pure | |
parent | 854a000b440ce06028709ce6969effc7fc78c7b6 (diff) | |
download | Nim-1c46fdf600c0bdc3ef19a77ac4ab4f0cf5061442.tar.gz |
Fixed stupid mistake when clamping acos
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/basic2d.nim | 6 |
1 files 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 |