Unravel Engine C# Reference
Loading...
Searching...
No Matches
Mathf Struct Reference

Public Member Functions

static int ClosestPowerOfTwo (int value)
 
static bool IsPowerOfTwo (int value)
 
static int NextPowerOfTwo (int value)
 

Static Public Member Functions

static float Sin (float f)
 
static float Cos (float f)
 
static float Tan (float f)
 
static float Asin (float f)
 
static float Acos (float f)
 
static float Atan (float f)
 
static float Atan2 (float y, float x)
 
static float Sqrt (float f)
 
static float Abs (float f)
 
static int Abs (int value)
 
static float Min (float a, float b)
 
static float Min (params float[] values)
 
static int Min (int a, int b)
 
static int Min (params int[] values)
 
static float Max (float a, float b)
 
static float Max (params float[] values)
 
static int Max (int a, int b)
 
static int Max (params int[] values)
 
static float Pow (float f, float p)
 
static float Exp (float power)
 
static float Log (float f, float p)
 
static float Log (float f)
 
static float Log10 (float f)
 
static float Ceil (float f)
 
static float Floor (float f)
 
static float Round (float f)
 
static int CeilToInt (float f)
 
static int FloorToInt (float f)
 
static int RoundToInt (float f)
 
static float Sign (float f)
 
static float Clamp (float value, float min, float max)
 
static int Clamp (int value, int min, int max)
 
static float Clamp01 (float value)
 
static float Lerp (float a, float b, float t)
 
static float LerpUnclamped (float a, float b, float t)
 
static float LerpAngle (float a, float b, float t)
 
static float MoveTowards (float current, float target, float maxDelta)
 
static float MoveTowardsAngle (float current, float target, float maxDelta)
 
static float SmoothStep (float from, float to, float t)
 
static bool Approximately (float a, float b)
 
static float SmoothDamp (float current, float target, ref float currentVelocity, float smoothTime, float maxSpeed, float deltaTime)
 
static float SmoothDampAngle (float current, float target, ref float currentVelocity, float smoothTime, float maxSpeed, float deltaTime)
 
static float Repeat (float t, float length)
 
static float PingPong (float t, float length)
 
static float InverseLerp (float a, float b, float value)
 
static float DeltaAngle (float current, float target)
 

Static Public Attributes

const float PI = MathF.PI
 
const float Infinity = float.PositiveInfinity
 
const float NegativeInfinity = float.NegativeInfinity
 
const float Deg2Rad = MathF.PI / 180f
 
const float Rad2Deg = 57.29578f
 
const float kEpsilon = 1E-05f
 
const float kEpsilonNormalSqrt = 1E-15f
 
static readonly float Epsilon = (MathfInternal.IsFlushToZeroEnabled ? MathfInternal.FloatMinNormal : MathfInternal.FloatMinDenormal)
 

Detailed Description

Definition at line 16 of file Mathf.cs.

Member Function Documentation

◆ Abs() [1/2]

static float Mathf.Abs ( float f)
static

Definition at line 186 of file Mathf.cs.

◆ Abs() [2/2]

static int Mathf.Abs ( int value)
static

Definition at line 197 of file Mathf.cs.

◆ Acos()

static float Mathf.Acos ( float f)
static

Definition at line 140 of file Mathf.cs.

◆ Approximately()

static bool Mathf.Approximately ( float a,
float b )
static

Definition at line 748 of file Mathf.cs.

◆ Asin()

static float Mathf.Asin ( float f)
static

Definition at line 129 of file Mathf.cs.

◆ Atan()

static float Mathf.Atan ( float f)
static

Definition at line 151 of file Mathf.cs.

◆ Atan2()

static float Mathf.Atan2 ( float y,
float x )
static

Definition at line 164 of file Mathf.cs.

◆ Ceil()

static float Mathf.Ceil ( float f)
static

Definition at line 447 of file Mathf.cs.

◆ CeilToInt()

static int Mathf.CeilToInt ( float f)
static

Definition at line 480 of file Mathf.cs.

◆ Clamp() [1/2]

static float Mathf.Clamp ( float value,
float min,
float max )
static

Definition at line 537 of file Mathf.cs.

◆ Clamp() [2/2]

static int Mathf.Clamp ( int value,
int min,
int max )
static

Definition at line 569 of file Mathf.cs.

◆ Clamp01()

static float Mathf.Clamp01 ( float value)
static

Definition at line 589 of file Mathf.cs.

◆ ClosestPowerOfTwo()

static int Mathf.ClosestPowerOfTwo ( int value)

◆ Cos()

static float Mathf.Cos ( float f)
static

Definition at line 107 of file Mathf.cs.

◆ DeltaAngle()

static float Mathf.DeltaAngle ( float current,
float target )
static

Definition at line 848 of file Mathf.cs.

◆ Exp()

static float Mathf.Exp ( float power)
static

Definition at line 401 of file Mathf.cs.

◆ Floor()

static float Mathf.Floor ( float f)
static

Definition at line 458 of file Mathf.cs.

◆ FloorToInt()

static int Mathf.FloorToInt ( float f)
static

Definition at line 491 of file Mathf.cs.

◆ InverseLerp()

static float Mathf.InverseLerp ( float a,
float b,
float value )
static

Definition at line 829 of file Mathf.cs.

◆ IsPowerOfTwo()

static bool Mathf.IsPowerOfTwo ( int value)

◆ Lerp()

static float Mathf.Lerp ( float a,
float b,
float t )
static

Definition at line 620 of file Mathf.cs.

◆ LerpAngle()

static float Mathf.LerpAngle ( float a,
float b,
float t )
static

Definition at line 665 of file Mathf.cs.

◆ LerpUnclamped()

static float Mathf.LerpUnclamped ( float a,
float b,
float t )
static

Definition at line 641 of file Mathf.cs.

◆ Log() [1/2]

static float Mathf.Log ( float f)
static

Definition at line 425 of file Mathf.cs.

◆ Log() [2/2]

static float Mathf.Log ( float f,
float p )
static

Definition at line 414 of file Mathf.cs.

◆ Log10()

static float Mathf.Log10 ( float f)
static

Definition at line 436 of file Mathf.cs.

◆ Max() [1/4]

static float Mathf.Max ( float a,
float b )
static

Definition at line 302 of file Mathf.cs.

◆ Max() [2/4]

static int Mathf.Max ( int a,
int b )
static

Definition at line 347 of file Mathf.cs.

◆ Max() [3/4]

static float Mathf.Max ( params float[] values)
static

Definition at line 317 of file Mathf.cs.

◆ Max() [4/4]

static int Mathf.Max ( params int[] values)
static

Definition at line 362 of file Mathf.cs.

◆ Min() [1/4]

static float Mathf.Min ( float a,
float b )
static

Definition at line 212 of file Mathf.cs.

◆ Min() [2/4]

static int Mathf.Min ( int a,
int b )
static

Definition at line 257 of file Mathf.cs.

◆ Min() [3/4]

static float Mathf.Min ( params float[] values)
static

Definition at line 227 of file Mathf.cs.

◆ Min() [4/4]

static int Mathf.Min ( params int[] values)
static

Definition at line 272 of file Mathf.cs.

◆ MoveTowards()

static float Mathf.MoveTowards ( float current,
float target,
float maxDelta )
static

Definition at line 689 of file Mathf.cs.

◆ MoveTowardsAngle()

static float Mathf.MoveTowardsAngle ( float current,
float target,
float maxDelta )
static

Definition at line 710 of file Mathf.cs.

◆ NextPowerOfTwo()

static int Mathf.NextPowerOfTwo ( int value)

◆ PingPong()

static float Mathf.PingPong ( float t,
float length )
static

Definition at line 806 of file Mathf.cs.

◆ Pow()

static float Mathf.Pow ( float f,
float p )
static

Definition at line 390 of file Mathf.cs.

◆ Repeat()

static float Mathf.Repeat ( float t,
float length )
static

Definition at line 792 of file Mathf.cs.

◆ Round()

static float Mathf.Round ( float f)
static

Definition at line 469 of file Mathf.cs.

◆ RoundToInt()

static int Mathf.RoundToInt ( float f)
static

Definition at line 502 of file Mathf.cs.

◆ Sign()

static float Mathf.Sign ( float f)
static

Definition at line 514 of file Mathf.cs.

◆ Sin()

static float Mathf.Sin ( float f)
static

Definition at line 92 of file Mathf.cs.

◆ SmoothDamp()

static float Mathf.SmoothDamp ( float current,
float target,
ref float currentVelocity,
float smoothTime,
float maxSpeed,
float deltaTime )
static

Definition at line 754 of file Mathf.cs.

◆ SmoothDampAngle()

static float Mathf.SmoothDampAngle ( float current,
float target,
ref float currentVelocity,
float smoothTime,
float maxSpeed,
float deltaTime )
static

Definition at line 777 of file Mathf.cs.

◆ SmoothStep()

static float Mathf.SmoothStep ( float from,
float to,
float t )
static

Definition at line 732 of file Mathf.cs.

◆ Sqrt()

static float Mathf.Sqrt ( float f)
static

Definition at line 175 of file Mathf.cs.

◆ Tan()

static float Mathf.Tan ( float f)
static

Definition at line 118 of file Mathf.cs.

Member Data Documentation

◆ Deg2Rad

const float Mathf.Deg2Rad = MathF.PI / 180f
static

Definition at line 36 of file Mathf.cs.

◆ Epsilon

Definition at line 52 of file Mathf.cs.

◆ Infinity

const float Mathf.Infinity = float.PositiveInfinity
static

Definition at line 26 of file Mathf.cs.

◆ kEpsilon

const float Mathf.kEpsilon = 1E-05f
static

Definition at line 46 of file Mathf.cs.

◆ kEpsilonNormalSqrt

const float Mathf.kEpsilonNormalSqrt = 1E-15f
static

Definition at line 48 of file Mathf.cs.

◆ NegativeInfinity

const float Mathf.NegativeInfinity = float.NegativeInfinity
static

Definition at line 31 of file Mathf.cs.

◆ PI

const float Mathf.PI = MathF.PI
static

Definition at line 21 of file Mathf.cs.

◆ Rad2Deg

const float Mathf.Rad2Deg = 57.29578f
static

Definition at line 41 of file Mathf.cs.


The documentation for this struct was generated from the following file: