Asin(float)
Returns the arc-sine of f - the angle in radians whose sine is f.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static float Asin(float f)
Parameters
Value to compute the arc-sine for, in the range [-1,1].
Returns
Type | Description |
|---|---|
| float | Angle in radians whose sine equals |
Remarks
For values of outside of the [-1,1] range, this function will return NaN.
fAdditional Resources: Mathf.Sin.
Examples
using UnityEngine;public class ScriptExample : MonoBehaviour{ void Start() { // Prints NaN Debug.Log(Mathf.Asin(-1.0000001f)); // Prints -1.570796 Debug.Log(Mathf.Asin(-1)); // Prints 0 Debug.Log(Mathf.Asin(0)); // Prints 1.570796 Debug.Log(Mathf.Asin(1)); // Prints NaN Debug.Log(Mathf.Asin(1.0000001f)); }}