Common math functions and constants.
More...
Common math functions and constants.
◆ AngleToVector3()
static Vector3 Anvil.API.NwMath.AngleToVector3 |
( |
float |
angle | ) |
|
|
inlinestatic |
Converts the specified angle into a direction/heading vector.
- Parameters
-
angle | The angle to convert. |
- Returns
- A normalised direction vector for the specified angle.
◆ VectorToAngle()
static float Anvil.API.NwMath.VectorToAngle |
( |
Vector3 |
direction | ) |
|
|
inlinestatic |
Converts the specified direction/heading vector to an angle.
- Parameters
-
direction | The direction/heading vector to convert. |
- Returns
- The angle, in degrees matching the direction of this vector.
◆ DegToRad
const float Anvil.API.NwMath.DegToRad = (float)(Math.PI * 2f / 360f) |
|
static |
Constant value for converting degrees to radians.
float radians = 180f * DegToRad;
.
◆ FeetToMeters
const float Anvil.API.NwMath.FeetToMeters = 0.3048f |
|
static |
Constant value for converting feet to meters.
float meters = 100f * FeetToMeters;
.
◆ MetersToFeet
const float Anvil.API.NwMath.MetersToFeet = 1f / FeetToMeters |
|
static |
Constant value for converting meters to feet.
float feet = 100f * MetersToFeet;
.
◆ MetersToYards
Constant value for converting meters to yards.
float yards = 100f * MetersToYards;
.
◆ RadToDeg
const float Anvil.API.NwMath.RadToDeg = 1f / DegToRad |
|
static |
Constant value for converting radians to degrees.
float degrees = 1.5708f * RadToDeg;
.
◆ YardsToMeters
const float Anvil.API.NwMath.YardsToMeters = 0.9144f |
|
static |
Constant value for converting yards to meters.
float meters = 100f * YardsToMeters;
.
The documentation for this class was generated from the following file:
- NWN.Anvil/src/main/API/NwMath.cs