function
Function syntax
float llTan(float theta// Angle in radians.
);- Returns
float- Energy
- 10
Returns the tangent of theta. Theta is in radians.
Returns a float that is the tangent of theta.
float result = llTan(0.0);Caveats
Section titled “Caveats”Because of IEE754 on floats , llTan(PI_BY_TWO) returns -22877332 ( hex: 0xCBAE8A4A) and not infinity
Examples
Section titled “Examples”Example 1
// Touch the object with this script in it to see the tangent of random numbers!default{ touch_start(integer num) { float r = llFrand(TWO_PI); llOwnerSay("The tangent of " + (string)r + " in radians or " + (string)(r * RAD_TO_DEG) + " in degrees is " + (string)llTan(r)); }}See also
Section titled “See also”Functions
Section titled “Functions”llSin—llAsin— sine & inverse SinellCos—llAcos— cosine & inverse cosinellAtan2— inverse tangent
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.