[erlang-questions] Missing math functions
Loïc Hoguin
essen@REDACTED
Thu Feb 1 12:49:15 CET 2018
Hello,
While reviewing some functions in SDL2 while traveling yesterday I found
two which have no equivalent in Erlang.
There is copysign which takes two float numbers and apply the second's
sign to the first.
And there is scalbn (also known as ldexp, apparently) which does x*2^i
where x is a double and i is an integer. I'm not sure what it's used for
to be honest.
Is there a reason these are not in the math module? I can always add
functions for SDL_copysign and SDL_scalbn in the NIF but if they could
be useful in Erlang itself, all the better.
Cheers,
--
Loïc Hoguin
https://ninenines.eu
More information about the erlang-questions
mailing list