3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
coat.math Class Reference

Static Public Member Functions

bool IsInfinity (float Value)
 0x7f7fffff
 
bool IsPositiveInfinity (float Value)
 1.
 
bool IsNegativeInfinity (float Value)
 1.
 
int MulDiv (int Number, int Numerator, int Denominator)
 The same as Win32 API "MulDiv".
 
float Rad (float Deg)
 
float Deg (float Rad)
 
float Rad (float Deg)
 
float Deg (float Rad)
 
float Sec (float Ms)
 
float Ms (float Sec)
 
bool IsZero (float f, float Eps)
 
bool IsOne (float f, float Eps)
 
bool IsOne (float f, float Eps)
 
bool IsMinusOne (float f, float Eps)
 
bool IsZeroToOneExact (float f)
 
bool IsZeroToOneEps (float f, float Eps)
 
bool IsInRange (int i, int Lo, int Hi)
 
bool IsInRangeExact (float f, float Lo, float Hi)
 
bool IsInRangeEps (float f, float Lo, float Hi, float Eps)
 
bool Equals (float x, float y, float Eps)
 
bool IsValid (float f)
 
bool IsValid (float f)
 
bool IsZero (float d, float Eps)
 
bool Equals (float x, float y, float Eps)
 
float Clamp01 (float f)
 
float ClampRange1 (float f)
 
float ClampRange (float f, float l)
 
float Lerp (float a, float b, float s)
 
float Cerp (float a, float b, float s)
 
float Lerp05 (float a, float b)
 
float Lerper (float Fm, float To, float x)
 
float LerperClamp01 (float Lo, float Hi, float x)
 
float MidPointLerp (float Start, float Mid, float End, float s)
 
int Abs (int n)
 
float Abs (float x)
 
float Abs (float x)
 
float Round (float x)
 
float Round (float x)
 
float Sqrt (float x)
 
float Sqrt (float x)
 
float FastInvSqrt (float x)
 
float FastSqrt (float x)
 
float Sin (float a)
 
float Cos (float a)
 
float Sin (float a)
 
float Cos (float a)
 
 SinCos (float Angle, float S, float C)
 
 SinCos (float Angle, float S, float C)
 
float Tan (float a)
 
float Tan (float a)
 
float ASin (float x)
 
float ASin (float x)
 
float ACos (float x)
 
float ACos (float x)
 
float ATan (float x)
 
float ATan (float x)
 
float ATan (float y, float x)
 
float ATan (float y, float x)
 
float Pow (float x, float y)
 
float Pow (float x, float y)
 
float Exp (float x)
 
float Exp (float x)
 
float Ldexp (float x, int exp)
 
float Ldexp (float x, int exp)
 
float Frexp (float x, int exp)
 
float Frexp (float x, int exp)
 
float Log (float x)
 
float Log (float x)
 
float Floor (float f)
 
float Ceil (float f)
 
float Frac (float f)
 
float Floor (float d)
 
float Ceil (float d)
 
float Frac (float d)
 
float Periodic (float f, float Lo, float Hi, int nPeriods=None)
 
int IndexForInsert (float f, float Array, int nCount, int Stride=0)
 
float AngleNormalizeTwoPi (float Angle)
 
float AngleNormalizeTwoPi (float Angle)
 0 <= Angle < TwoPi
 
float AngleNormalizePi (float Angle)
 0 <= Angle < TwoPi
 
float AngleNormalize360 (float Angle)
 
  • Pi < Angle <= Pi

 
float AngleNormalize180 (float Angle)
 
 AngleEnsureShortestPath180 (float Alpha, float Beta)
 
float AngleDeltaRad (float Alpha, float Beta)
 
float AngleLerpRad (float Alpha, float Beta, float s)
 
float AngleDeltaDeg (float Alpha, float Beta)
 
float AngleLerpDeg (float Alpha, float Beta, float s)
 
int ClosestPowerOfTwo (int X)
 
int UpperPowerOfTwo (int X)
 
int LowerPowerOfTwo (int X)
 
bool IsPowerOfTwo (int X)
 
 Randomize (int Seed)
 
float Rand01 ()
 
bool RandBool ()
 
float RandRange1 ()
 
float dRand (float Lo, float Hi)
 
float Rand (float Lo, float Hi)
 
int Rand (int Lo, int Hi)
 
int SignBitSet (int i)
 
int SignBitNotSet (int i)
 
float TCBAdjInCoeff (float tPrev, float tCur, float tNext)
 
float TCBAdjOutCoeff (float tPrev, float tCur, float tNext)
 
int AlignToDword (int i)
 
int Checksum (any Src, int Size)
 
int Float2Half (float Float)
 
float Half2Float (int Half)
 
any EndianSwap2 (any Src, int Count=1)
 b (byte, char)
 
any EndianSwap4 (any Src, int Count=1)
 w (word, short)
 
any EndianSwap8 (any Src, int Count=1)
 d (dword, int, float)
 
any EndianSwap (any Src, str Format, int Count=1)
 q (qword, double)
 

Member Function Documentation

◆ Abs() [1/3]

float coat.math.Abs ( float x)
static

◆ Abs() [2/3]

float coat.math.Abs ( float x)
static

◆ Abs() [3/3]

int coat.math.Abs ( int n)
static

◆ ACos() [1/2]

float coat.math.ACos ( float x)
static

◆ ACos() [2/2]

float coat.math.ACos ( float x)
static

◆ AlignToDword()

int coat.math.AlignToDword ( int i)
static

◆ AngleDeltaDeg()

float coat.math.AngleDeltaDeg ( float Alpha,
float Beta )
static

◆ AngleDeltaRad()

float coat.math.AngleDeltaRad ( float Alpha,
float Beta )
static

◆ AngleEnsureShortestPath180()

coat.math.AngleEnsureShortestPath180 ( float Alpha,
float Beta )
static

◆ AngleLerpDeg()

float coat.math.AngleLerpDeg ( float Alpha,
float Beta,
float s )
static

◆ AngleLerpRad()

float coat.math.AngleLerpRad ( float Alpha,
float Beta,
float s )
static

◆ AngleNormalize180()

float coat.math.AngleNormalize180 ( float Angle)
static

◆ AngleNormalize360()

float coat.math.AngleNormalize360 ( float Angle)
static

  • Pi < Angle <= Pi

◆ AngleNormalizePi()

float coat.math.AngleNormalizePi ( float Angle)
static

0 <= Angle < TwoPi

◆ AngleNormalizeTwoPi() [1/2]

float coat.math.AngleNormalizeTwoPi ( float Angle)
static

◆ AngleNormalizeTwoPi() [2/2]

float coat.math.AngleNormalizeTwoPi ( float Angle)
static

0 <= Angle < TwoPi

◆ ASin() [1/2]

float coat.math.ASin ( float x)
static

◆ ASin() [2/2]

float coat.math.ASin ( float x)
static

◆ ATan() [1/4]

float coat.math.ATan ( float x)
static

◆ ATan() [2/4]

float coat.math.ATan ( float x)
static

◆ ATan() [3/4]

float coat.math.ATan ( float y,
float x )
static

◆ ATan() [4/4]

float coat.math.ATan ( float y,
float x )
static

◆ Ceil() [1/2]

float coat.math.Ceil ( float d)
static

◆ Ceil() [2/2]

float coat.math.Ceil ( float f)
static

◆ Cerp()

float coat.math.Cerp ( float a,
float b,
float s )
static

◆ Checksum()

int coat.math.Checksum ( any Src,
int Size )
static

◆ Clamp01()

float coat.math.Clamp01 ( float f)
static

◆ ClampRange()

float coat.math.ClampRange ( float f,
float l )
static

◆ ClampRange1()

float coat.math.ClampRange1 ( float f)
static

◆ ClosestPowerOfTwo()

int coat.math.ClosestPowerOfTwo ( int X)
static

◆ Cos() [1/2]

float coat.math.Cos ( float a)
static

◆ Cos() [2/2]

float coat.math.Cos ( float a)
static

◆ Deg() [1/2]

float coat.math.Deg ( float Rad)
static

◆ Deg() [2/2]

float coat.math.Deg ( float Rad)
static

◆ dRand()

float coat.math.dRand ( float Lo,
float Hi )
static

◆ EndianSwap()

any coat.math.EndianSwap ( any Src,
str Format,
int Count = 1 )
static

q (qword, double)

◆ EndianSwap2()

any coat.math.EndianSwap2 ( any Src,
int Count = 1 )
static

b (byte, char)

◆ EndianSwap4()

any coat.math.EndianSwap4 ( any Src,
int Count = 1 )
static

w (word, short)

◆ EndianSwap8()

any coat.math.EndianSwap8 ( any Src,
int Count = 1 )
static

d (dword, int, float)

◆ Equals() [1/2]

bool coat.math.Equals ( float x,
float y,
float Eps )
static

◆ Equals() [2/2]

bool coat.math.Equals ( float x,
float y,
float Eps )
static

◆ Exp() [1/2]

float coat.math.Exp ( float x)
static

◆ Exp() [2/2]

float coat.math.Exp ( float x)
static

◆ FastInvSqrt()

float coat.math.FastInvSqrt ( float x)
static

◆ FastSqrt()

float coat.math.FastSqrt ( float x)
static

◆ Float2Half()

int coat.math.Float2Half ( float Float)
static

◆ Floor() [1/2]

float coat.math.Floor ( float d)
static

◆ Floor() [2/2]

float coat.math.Floor ( float f)
static

◆ Frac() [1/2]

float coat.math.Frac ( float d)
static

◆ Frac() [2/2]

float coat.math.Frac ( float f)
static

◆ Frexp() [1/2]

float coat.math.Frexp ( float x,
int exp )
static

◆ Frexp() [2/2]

float coat.math.Frexp ( float x,
int exp )
static

◆ Half2Float()

float coat.math.Half2Float ( int Half)
static

◆ IndexForInsert()

int coat.math.IndexForInsert ( float f,
float Array,
int nCount,
int Stride = 0 )
static

◆ IsInfinity()

bool coat.math.IsInfinity ( float Value)
static

0x7f7fffff

◆ IsInRange()

bool coat.math.IsInRange ( int i,
int Lo,
int Hi )
static

◆ IsInRangeEps()

bool coat.math.IsInRangeEps ( float f,
float Lo,
float Hi,
float Eps )
static

◆ IsInRangeExact()

bool coat.math.IsInRangeExact ( float f,
float Lo,
float Hi )
static

◆ IsMinusOne()

bool coat.math.IsMinusOne ( float f,
float Eps )
static

◆ IsNegativeInfinity()

bool coat.math.IsNegativeInfinity ( float Value)
static

1.

#INF000

◆ IsOne() [1/2]

bool coat.math.IsOne ( float f,
float Eps )
static

◆ IsOne() [2/2]

bool coat.math.IsOne ( float f,
float Eps )
static

◆ IsPositiveInfinity()

bool coat.math.IsPositiveInfinity ( float Value)
static

1.

#INF000 or -1.#INF000

◆ IsPowerOfTwo()

bool coat.math.IsPowerOfTwo ( int X)
static

◆ IsValid() [1/2]

bool coat.math.IsValid ( float f)
static

◆ IsValid() [2/2]

bool coat.math.IsValid ( float f)
static

◆ IsZero() [1/2]

bool coat.math.IsZero ( float d,
float Eps )
static

◆ IsZero() [2/2]

bool coat.math.IsZero ( float f,
float Eps )
static
Todo
fine Add templates.

◆ IsZeroToOneEps()

bool coat.math.IsZeroToOneEps ( float f,
float Eps )
static

◆ IsZeroToOneExact()

bool coat.math.IsZeroToOneExact ( float f)
static

◆ Ldexp() [1/2]

float coat.math.Ldexp ( float x,
int exp )
static

◆ Ldexp() [2/2]

float coat.math.Ldexp ( float x,
int exp )
static

◆ Lerp()

float coat.math.Lerp ( float a,
float b,
float s )
static

◆ Lerp05()

float coat.math.Lerp05 ( float a,
float b )
static

◆ Lerper()

float coat.math.Lerper ( float Fm,
float To,
float x )
static

◆ LerperClamp01()

float coat.math.LerperClamp01 ( float Lo,
float Hi,
float x )
static

◆ Log() [1/2]

float coat.math.Log ( float x)
static

◆ Log() [2/2]

float coat.math.Log ( float x)
static

◆ LowerPowerOfTwo()

int coat.math.LowerPowerOfTwo ( int X)
static

◆ MidPointLerp()

float coat.math.MidPointLerp ( float Start,
float Mid,
float End,
float s )
static

◆ Ms()

float coat.math.Ms ( float Sec)
static

◆ MulDiv()

int coat.math.MulDiv ( int Number,
int Numerator,
int Denominator )
static

The same as Win32 API "MulDiv".

◆ Periodic()

float coat.math.Periodic ( float f,
float Lo,
float Hi,
int nPeriods = None )
static

◆ Pow() [1/2]

float coat.math.Pow ( float x,
float y )
static

◆ Pow() [2/2]

float coat.math.Pow ( float x,
float y )
static

◆ Rad() [1/2]

float coat.math.Rad ( float Deg)
static

◆ Rad() [2/2]

float coat.math.Rad ( float Deg)
static

◆ Rand() [1/2]

float coat.math.Rand ( float Lo,
float Hi )
static

◆ Rand() [2/2]

int coat.math.Rand ( int Lo,
int Hi )
static

◆ Rand01()

float coat.math.Rand01 ( )
static

◆ RandBool()

bool coat.math.RandBool ( )
static

◆ Randomize()

coat.math.Randomize ( int Seed)
static

◆ RandRange1()

float coat.math.RandRange1 ( )
static

◆ Round() [1/2]

float coat.math.Round ( float x)
static

◆ Round() [2/2]

float coat.math.Round ( float x)
static

◆ Sec()

float coat.math.Sec ( float Ms)
static

◆ SignBitNotSet()

int coat.math.SignBitNotSet ( int i)
static

◆ SignBitSet()

int coat.math.SignBitSet ( int i)
static

◆ Sin() [1/2]

float coat.math.Sin ( float a)
static

◆ Sin() [2/2]

float coat.math.Sin ( float a)
static

◆ SinCos() [1/2]

coat.math.SinCos ( float Angle,
float S,
float C )
static

◆ SinCos() [2/2]

coat.math.SinCos ( float Angle,
float S,
float C )
static

◆ Sqrt() [1/2]

float coat.math.Sqrt ( float x)
static

◆ Sqrt() [2/2]

float coat.math.Sqrt ( float x)
static

◆ Tan() [1/2]

float coat.math.Tan ( float a)
static

◆ Tan() [2/2]

float coat.math.Tan ( float a)
static

◆ TCBAdjInCoeff()

float coat.math.TCBAdjInCoeff ( float tPrev,
float tCur,
float tNext )
static

◆ TCBAdjOutCoeff()

float coat.math.TCBAdjOutCoeff ( float tPrev,
float tCur,
float tNext )
static

◆ UpperPowerOfTwo()

int coat.math.UpperPowerOfTwo ( int X)
static

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