Notifications
Clear all

[Closed] [Max 2010] The Hyperbolic Trig functions are wrong

So I’ve noticed when you use any hyperbolic trig functions in maxscript it treats your inputs as being in degrees and converts them to radians before calculating the output of the function.

e.g.

In Maxscript: sinh 0.4 = 0.00698137
  Correct value using exponentials: sinh 0.4 = (exp(0.4) - exp(-0.4))/2 = 0.410752
  What max is actually doing: sinh(degtorad 0.4) = sinh(0.00698137) = 0.00698137

Unless I am missing some sort of programming or mathematical convention though the hyperbolic functions should be unit-independent and operate on pure floats. It seems silly that I need to use radtodeg just to correct something that maxscript shouldn’t be calculating in the first place.

Is there a reason for this?

2 Replies

Hello,

You need to use radToDeg, then it will work.

-Harry

from mxs help:

Trigonometric Functions
MAXScript supports the following standard trigonometric functions. Angles are represented in degrees.

acos <number>
asin <number>
atan <number>
atan2 <number> <number>
cos <number>
cosh <number>
sin <number>

sinh <number>

tan <number>
tanh <number>

so it’s how mxs works. that means max tells you that if you want to get hyperbolic expression you have to convert degrees to radians