Table of Contents

Class FastMath

Namespace
Root
Assembly
Game.Core.dll
public static class FastMath
Inheritance
object
FastMath

Methods

Clamp(int, int, int)

public static int Clamp(int x, int min, int max)

Parameters

x int
min int
max int

Returns

int

Clamp(float, float, float)

public static float Clamp(float x, float min, float max)

Parameters

x float
min float
max float

Returns

float

DeltaRange(int, int, int)

public static int DeltaRange(int a, int b, int range)

Parameters

a int
b int
range int

Returns

int

DeltaRange(float, float, float)

public static float DeltaRange(float a, float b, float range)

Parameters

a float
b float
range float

Returns

float

Max(short, short)

public static short Max(short a, short b)

Parameters

a short
b short

Returns

short

Max(int, int)

public static int Max(int a, int b)

Parameters

a int
b int

Returns

int

Max(float, float)

public static float Max(float a, float b)

Parameters

a float
b float

Returns

float

Min(short, short)

public static short Min(short a, short b)

Parameters

a short
b short

Returns

short

Min(int, int)

public static int Min(int a, int b)

Parameters

a int
b int

Returns

int

Min(float, float)

public static float Min(float a, float b)

Parameters

a float
b float

Returns

float

NormalizeAngleDegrees(float)

public static float NormalizeAngleDegrees(float x)

Parameters

x float

Returns

float

SafeDivide(int, int)

public static int SafeDivide(int numerator, int denominator)

Parameters

numerator int
denominator int

Returns

int

SafeDivide(long, long)

public static long SafeDivide(long numerator, long denominator)

Parameters

numerator long
denominator long

Returns

long

SafeMod(int, int)

public static int SafeMod(int x, int m)

Parameters

x int
m int

Returns

int

SafeMod(long, long)

public static long SafeMod(long x, long m)

Parameters

x long
m long

Returns

long

SafeMod(float, float)

public static float SafeMod(float x, float m)

Parameters

x float
m float

Returns

float

SafeRoundToMultiple(float, float)

public static float SafeRoundToMultiple(float x, float m)

Parameters

x float
m float

Returns

float