Trusted answers to developer questions

harris910

The ** asin()** function, also called the

`arc sine`

function, calculates and returns the To be more specific, it returns the inverse sine of a number in radians.

Figure 1 below shows the *mathematical* representation of the `asin()`

function.

Figure 2 shows the *visual* representation of the `asin()`

function.

To convert `radians`

to `degrees`

, use the following function:

```
rad2deg(angleInRadians)
```

```
asin(num)
```

This function requires a `number`

as a parameter.

`asin()`

returns the `inverse sine`

of a number (in radians) that is set as a parameter. The return value lies in the interval `[-pi/2, pi/2]`

radians.

#this header for rad2deg() function use Math::Trig; #Positive number in radians $a = asin(0.5); print "asin(0.5): $a Radians\n"; #negative number in radians $b = asin(-0.5); print "asin(-0.5): $b Radians\n"; #applying asin() and then converting the result in radians to degrees #radians = 0.5 $c = rad2deg(asin(0.5)); print "asin(0.5): $c Degrees\n";

RELATED TAGS

perl

math

asin

communitycreator

CONTRIBUTOR

harris910

RELATED COURSES

View all Courses

Keep Exploring

Related Courses