Class Mathf
Float based math class for use in engine.
Inheritance
System.Object
Mathf
Assembly: Chroma.Mono.dll
Syntax
Fields
E
E to a precision of 16 decimal digits.
Declaration
public const float E = 2.71828175F
Field Value
Type |
Description |
System.Single |
|
PI
PI to a precision of 16 decimal digits.
Declaration
public const float PI = 3.14159274F
Field Value
Type |
Description |
System.Single |
|
Methods
Abs(Single)
Declaration
public static float Abs(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Acos(Single)
Declaration
public static float Acos(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Atan(Single)
Declaration
public static float Atan(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Atan2(Single, Single)
Declaration
public static float Atan2(float x, float y)
Parameters
Type |
Name |
Description |
System.Single |
x |
|
System.Single |
y |
|
Returns
Type |
Description |
System.Single |
|
Ceiling(Single)
Declaration
public static float Ceiling(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Clamp(Single, Single, Single)
Declaration
public static float Clamp(float val, float min, float max)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
System.Single |
min |
|
System.Single |
max |
|
Returns
Type |
Description |
System.Single |
|
Clamp<T>(T, T, T)
Declaration
public static T Clamp<T>(T val, T min, T max)
where T : IComparable<T>
Parameters
Type |
Name |
Description |
T |
val |
|
T |
min |
|
T |
max |
|
Returns
Type Parameters
Cos(Single)
Declaration
public static float Cos(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Cosh(Single)
Declaration
public static float Cosh(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
DegreesToRadians(Single)
Declaration
public static float DegreesToRadians(float degrees)
Parameters
Type |
Name |
Description |
System.Single |
degrees |
|
Returns
Type |
Description |
System.Single |
|
Exp(Single)
Declaration
public static float Exp(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Floor(Single)
Declaration
public static float Floor(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
IEEERemainder(Single, Single)
Declaration
public static float IEEERemainder(float a, float b)
Parameters
Type |
Name |
Description |
System.Single |
a |
|
System.Single |
b |
|
Returns
Type |
Description |
System.Single |
|
Log(Single)
Declaration
public static float Log(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Log(Single, Single)
Declaration
public static float Log(float val, float new_base)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
System.Single |
new_base |
|
Returns
Type |
Description |
System.Single |
|
Log10(Single)
Declaration
public static float Log10(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Max(Byte, Byte)
Declaration
public static byte Max(byte a, byte b)
Parameters
Type |
Name |
Description |
System.Byte |
a |
|
System.Byte |
b |
|
Returns
Type |
Description |
System.Byte |
|
Max(Decimal, Decimal)
Declaration
public static decimal Max(decimal a, decimal b)
Parameters
Type |
Name |
Description |
System.Decimal |
a |
|
System.Decimal |
b |
|
Returns
Type |
Description |
System.Decimal |
|
Max(Double, Double)
Declaration
public static double Max(double a, double b)
Parameters
Type |
Name |
Description |
System.Double |
a |
|
System.Double |
b |
|
Returns
Type |
Description |
System.Double |
|
Max(Int16, Int16)
Declaration
public static short Max(short a, short b)
Parameters
Type |
Name |
Description |
System.Int16 |
a |
|
System.Int16 |
b |
|
Returns
Type |
Description |
System.Int16 |
|
Max(Int32, Int32)
Declaration
public static int Max(int a, int b)
Parameters
Type |
Name |
Description |
System.Int32 |
a |
|
System.Int32 |
b |
|
Returns
Type |
Description |
System.Int32 |
|
Max(Int64, Int64)
Declaration
public static long Max(long a, long b)
Parameters
Type |
Name |
Description |
System.Int64 |
a |
|
System.Int64 |
b |
|
Returns
Type |
Description |
System.Int64 |
|
Max(SByte, SByte)
Declaration
public static sbyte Max(sbyte a, sbyte b)
Parameters
Type |
Name |
Description |
System.SByte |
a |
|
System.SByte |
b |
|
Returns
Type |
Description |
System.SByte |
|
Max(Single, Single)
Declaration
public static float Max(float a, float b)
Parameters
Type |
Name |
Description |
System.Single |
a |
|
System.Single |
b |
|
Returns
Type |
Description |
System.Single |
|
Max(UInt16, UInt16)
Declaration
public static ushort Max(ushort a, ushort b)
Parameters
Type |
Name |
Description |
System.UInt16 |
a |
|
System.UInt16 |
b |
|
Returns
Type |
Description |
System.UInt16 |
|
Max(UInt32, UInt32)
Declaration
public static uint Max(uint a, uint b)
Parameters
Type |
Name |
Description |
System.UInt32 |
a |
|
System.UInt32 |
b |
|
Returns
Type |
Description |
System.UInt32 |
|
Max(UInt64, UInt64)
Declaration
public static ulong Max(ulong a, ulong b)
Parameters
Type |
Name |
Description |
System.UInt64 |
a |
|
System.UInt64 |
b |
|
Returns
Type |
Description |
System.UInt64 |
|
Min(Byte, Byte)
Declaration
public static byte Min(byte a, byte b)
Parameters
Type |
Name |
Description |
System.Byte |
a |
|
System.Byte |
b |
|
Returns
Type |
Description |
System.Byte |
|
Min(Decimal, Decimal)
Declaration
public static decimal Min(decimal a, decimal b)
Parameters
Type |
Name |
Description |
System.Decimal |
a |
|
System.Decimal |
b |
|
Returns
Type |
Description |
System.Decimal |
|
Min(Double, Double)
Declaration
public static double Min(double a, double b)
Parameters
Type |
Name |
Description |
System.Double |
a |
|
System.Double |
b |
|
Returns
Type |
Description |
System.Double |
|
Min(Int16, Int16)
Declaration
public static short Min(short a, short b)
Parameters
Type |
Name |
Description |
System.Int16 |
a |
|
System.Int16 |
b |
|
Returns
Type |
Description |
System.Int16 |
|
Min(Int32, Int32)
Declaration
public static int Min(int a, int b)
Parameters
Type |
Name |
Description |
System.Int32 |
a |
|
System.Int32 |
b |
|
Returns
Type |
Description |
System.Int32 |
|
Min(Int64, Int64)
Declaration
public static long Min(long a, long b)
Parameters
Type |
Name |
Description |
System.Int64 |
a |
|
System.Int64 |
b |
|
Returns
Type |
Description |
System.Int64 |
|
Min(SByte, SByte)
Declaration
public static sbyte Min(sbyte a, sbyte b)
Parameters
Type |
Name |
Description |
System.SByte |
a |
|
System.SByte |
b |
|
Returns
Type |
Description |
System.SByte |
|
Min(Single, Single)
Declaration
public static float Min(float a, float b)
Parameters
Type |
Name |
Description |
System.Single |
a |
|
System.Single |
b |
|
Returns
Type |
Description |
System.Single |
|
Min(UInt16, UInt16)
Declaration
public static ushort Min(ushort a, ushort b)
Parameters
Type |
Name |
Description |
System.UInt16 |
a |
|
System.UInt16 |
b |
|
Returns
Type |
Description |
System.UInt16 |
|
Min(UInt32, UInt32)
Declaration
public static uint Min(uint a, uint b)
Parameters
Type |
Name |
Description |
System.UInt32 |
a |
|
System.UInt32 |
b |
|
Returns
Type |
Description |
System.UInt32 |
|
Min(UInt64, UInt64)
Declaration
public static ulong Min(ulong a, ulong b)
Parameters
Type |
Name |
Description |
System.UInt64 |
a |
|
System.UInt64 |
b |
|
Returns
Type |
Description |
System.UInt64 |
|
Pow(Single, Single)
Declaration
public static float Pow(float a, float b)
Parameters
Type |
Name |
Description |
System.Single |
a |
|
System.Single |
b |
|
Returns
Type |
Description |
System.Single |
|
RadiansToDegrees(Single)
Declaration
public static float RadiansToDegrees(float radians)
Parameters
Type |
Name |
Description |
System.Single |
radians |
|
Returns
Type |
Description |
System.Single |
|
Round(Single)
Declaration
public static float Round(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Round(Single, Int32)
Declaration
public static float Round(float val, int rounding)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
System.Int32 |
rounding |
|
Returns
Type |
Description |
System.Single |
|
Sign(Decimal)
Declaration
public static int Sign(decimal val)
Parameters
Type |
Name |
Description |
System.Decimal |
val |
|
Returns
Type |
Description |
System.Int32 |
|
Sign(Double)
Declaration
public static int Sign(double val)
Parameters
Type |
Name |
Description |
System.Double |
val |
|
Returns
Type |
Description |
System.Int32 |
|
Sign(Int16)
Declaration
public static int Sign(short val)
Parameters
Type |
Name |
Description |
System.Int16 |
val |
|
Returns
Type |
Description |
System.Int32 |
|
Sign(Int32)
Declaration
public static int Sign(int val)
Parameters
Type |
Name |
Description |
System.Int32 |
val |
|
Returns
Type |
Description |
System.Int32 |
|
Sign(Int64)
Declaration
public static int Sign(long val)
Parameters
Type |
Name |
Description |
System.Int64 |
val |
|
Returns
Type |
Description |
System.Int32 |
|
Sign(SByte)
Declaration
public static int Sign(sbyte val)
Parameters
Type |
Name |
Description |
System.SByte |
val |
|
Returns
Type |
Description |
System.Int32 |
|
Sign(Single)
Declaration
public static int Sign(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Int32 |
|
Sin(Single)
Declaration
public static float Sin(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Sinh(Single)
Declaration
public static float Sinh(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Sqrt(Single)
Declaration
public static float Sqrt(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Square(Single)
Declaration
public static float Square(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Tan(Single)
Declaration
public static float Tan(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Tanh(Single)
Declaration
public static float Tanh(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
Truncate(Single)
Declaration
public static float Truncate(float val)
Parameters
Type |
Name |
Description |
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|