
More mathimatical functions.
Moderator: GZDoom Developers
-
- Posts: 43
- Joined: Sun Dec 05, 2004 1:35 pm
More mathimatical functions.
Considering the fact that zdoom has sin and cos, why isnt there tan? And why not expand that even further with more functions such as Atan, Atan2, Asin, Acos, and what ever else I forgot. 

-
- Lead GZDoom+Raze Developer
- Posts: 47986
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Posts: 399
- Joined: Sun Jan 11, 2004 1:46 pm
- Location: Superior, WI
-
- Posts: 2841
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan Support
Still would be faster to have an opcode for it specificly. Since ACS is interpreted byte-code, it'd be faster to use one opcode for tan() than to fake it with two. Not to mention, libc could (and probably does) have special code to calculate the value faster and safer (simply doing cos(value)/sin(value) is asking for a crash if sin returns 0).