[erlang-questions] sine and cosine with degree angles
Thu Aug 26 13:57:25 CEST 2010
2010/8/26 Dmitry Belyaev <>:
> 1> math:sin(math:pi()).
> It's floating point, it's always not completely accurate.
> Check for epsilon range:
> -define(EPS, 1.0e-10).
> if -?EPS < Value andalso Value < ?EPS -> 0; _ -> Value end.
> Dmitry Belyaev
i know it's about approximations. this is why i was asking if i'm
missing an erlang function which takes degrees instead of radiants as
thank you for your suggestion, i will use the EPS.
More information about the erlang-questions