cos – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
(Not a bug.)
mNo edit summary
 
Line 1: Line 1:
== Buggy Cosinus ==
Your signature with timestamp


This command is buggy in OFP, I hope that this will be fixed in Armed Assault.
sin 0 => 0
sin 90 => 1
cos 0 => 1
cos 90 => -4.37114e-008 !!
This leads to some problems when working with this value.
:This is not a bug, but a result of floating point rounding errors. Expecting any floating point calculations results to be exactly equal is bad, and leads to errors. Most often this is cared for by comparing for abs(x-y)<epsilon instead of checking x==y.  --[[User:Suma|Suma]] 17:52, 8 August 2006 (CEST)

Latest revision as of 01:49, 9 August 2006