RelicNews Forums

Go Back   RelicNews Forums > RDN - Relic Game Mods > Homeworld 2 - Tanis Shipyards > Archive Dump
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Closed Thread
 
Thread Tools
Old 12th Sep 05, 5:27 PM Forum Rules   # 1
Mikail
Lost in the Web...
 
Mikail's Avatar
 
Join Date: Jun 2003
Location: %HW2_ROOT%

Trigonometric Functions

I made some more LUA trigonometric functions.

Code:
-- returns the hyperbolic cosine of an angle function cosh(fAng) return (exp(fAng) + exp(-fAng)) / 2 end -- returns the hyperbolic sine of an angle function sinh(fAng) return (exp(fAng) - exp(-fAng)) / 2 end -- returns the hyperbolic tangent of an angle function tanh(fAng) return (exp(fAng) - exp(-fAng)) / (exp(fAng) + exp(-fAng)) end -- returns the hyperbolic cosecant of an angle function csch(fAng) return 1 / sinh(fAng) end -- returns the hyperbolic secant of an angle function sech(fAng) return 1 / cosh(fAng) end -- returns the hyperbolic cotangent of an angle function coth(fAng) return 1 / tanh(fAng) end -- returns the cosecant of an angle function csc(fAng) return 1 / sin(fAng) end -- returns the secant of an angle function sec(fAng) return 1 / cos(fAng) end -- returns the cotangent of an angle function cot(fAng) return 1 / tan(fAng) end -- returns the exsecant of an angle function exsec(fAng) return sec(fAng) - 1 end -- returns the coexsecant of an angle function coexsec(fAng) return csc(fAng) - 1 end -- returns the versesine of an angle function vers(fAng) return 1 - cos(fAng) end -- returns the coversesine of an angle function covers(fAng) return 1 - sin(fAng) end -- returns the half-versesine of an angle function hav(fAng) return vers(fAng) / 2 end
__________________
Download my HW2 mods, maps & tools. link
Mikail is offline  
Closed Thread



Go Back   RelicNews Forums > RDN - Relic Game Mods > Homeworld 2 - Tanis Shipyards > Archive Dump
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




All times are GMT -7. The time now is 4:55 AM.

Page generated in 0.14556193 seconds (87.73% PHP - 12.27% MySQL) with 9 queries

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.