atan2
Returns the 2-argument arctangent of a pair of float values.
Read time 3 minutesLast updated 12 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
atan2(float, float)
Returns the 2-argument arctangent of a pair of float values.
public static float atan2(float y, float x)
Parameters
Returns
Type | Description |
|---|---|
| float | The arctangent of the ratio y/x, in radians. |
atan2(float2, float2)
Returns the componentwise 2-argument arctangent of a pair of floats2 vectors.
public static float2 atan2(float2 y, float2 x)
Parameters
Returns
Type | Description |
|---|---|
| float2 | The componentwise arctangent of the ratio y/x, in radians. |
atan2(float3, float3)
Returns the componentwise 2-argument arctangent of a pair of floats3 vectors.
public static float3 atan2(float3 y, float3 x)
Parameters
Returns
Type | Description |
|---|---|
| float3 | The componentwise arctangent of the ratio y/x, in radians. |
atan2(float4, float4)
Returns the componentwise 2-argument arctangent of a pair of floats4 vectors.
public static float4 atan2(float4 y, float4 x)
Parameters
Returns
Type | Description |
|---|---|
| float4 | The componentwise arctangent of the ratio y/x, in radians. |
atan2(double, double)
Returns the 2-argument arctangent of a pair of double values.
public static double atan2(double y, double x)
Parameters
Returns
Type | Description |
|---|---|
| double | The arctangent of the ratio y/x, in radians. |
atan2(double2, double2)
Returns the 2-argument arctangent of a pair of double2 vectors.
public static double2 atan2(double2 y, double2 x)
Parameters
Returns
Type | Description |
|---|---|
| double2 | The componentwise arctangent of the ratio y/x, in radians. |
atan2(double3, double3)
Returns the 2-argument arctangent of a pair of double3 vectors.
public static double3 atan2(double3 y, double3 x)
Parameters
Returns
Type | Description |
|---|---|
| double3 | The componentwise arctangent of the ratio y/x, in radians. |
atan2(double4, double4)
Returns the 2-argument arctangent of a pair of double4 vectors.
public static double4 atan2(double4 y, double4 x)
Parameters
Returns
Type | Description |
|---|---|
| double4 | The componentwise arctangent of the ratio y/x, in radians. |