Skip to content
lsl.devlsl.devLSL Dev

llAsin

function
Function syntax
float llAsin(
  1. float val// A number in the range [-1.0, 1.0].
);
Returns
float
Energy
10

The returned value is in the range [-PI_BY_TWO, PI_BY_TWO], or NaN signifying a complex result when the parameter is out of range.

Returns a float that is the arcsine in radians of val

How to use
float result = llAsin(0.0);
  • Triggers a Math Error for complex results if not compiled in Mono.
Example 1
// Touch the object with this script in it to see the arcsine of random numbers!
default
{
touch_start(integer num)
{
float r = llFrand(2) - 1.0;
llOwnerSay("The arcsine of " + (string)r + " is " + (string)llAsin(r));
}
}
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.

From the Second Life Wiki

Community documentation adapted from LlAsin, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

  • LlAsin (revision 1216697, )

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.