01-28-2013, 12:59
A friend of mine tested me some of those functions, there was an error because the game has a built-in "exp" function. These functions were tested and fully working (they are all trigonometric):
Code:
cot( angle ) //cotangent
{
return ( cos( angle ) / sin( angle ) );
}
sec( angle ) //secant
{
return ( 1 / cos( angle ) );
}
cosec( angle ) //cosecant
{
return ( 1 / sin( angle ) );
}
cosh( angle ) //hiperbolic cosine
{
return ( ( exp( angle ) + exp( angle * -1 ) ) / 2 );
}
sinh( angle ) //hiperbolic sine
{
return ( ( exp( angle ) - exp( angle * -1 ) ) / 2 );
}
tanh( angle ) //hiperbolic tangent
{
return ( sinh( angle ) / cosh( angle ) );
}
versin( angle ) //versed sine
{
return ( 1 - cos( angle ) );
}
vercosin( angle ) //versed cosine
{
return ( 1 + cos( angle ) );
}
haversin( angle ) //haversed versine
{
return ( versin( angle ) / 2 );
}
havercosin( angle ) //haversed cosine
{
return ( vercosin( angle ) / 2 );
}