C# Class PhaseEngine.Tools

Show file Open project: nobuyukinyuu/PhaseEngine

Private Properties

Property Type Description
Abs int
Abs long
Abs short
BIT uint
Ctz int
GCD ulong
InverseLerp double
InverseLerp float
LCM ulong
Lerp double
Lerp float
Lerp16 int
Lerp16 short
Lerp16 ushort
Lerp8 byte
Log10 double
Log2 double
Remap double
Sign int
fp_to_linear Int32
linear_to_fp short
make_bitmask ushort
unsigned_bitmask byte

Public Methods

Method Description
BIT ( byte x, byte n, byte w ) : byte
BIT ( int x, byte n ) : int
BIT ( int x, byte n, byte w ) : int
BIT ( long x, byte n ) : long
BIT ( long x, byte n, byte w ) : long
BIT ( short x, byte n ) : short
BIT ( short x, byte n, byte w ) : short
BIT ( uint x, byte n ) : uint
BIT ( ulong x, byte n ) : ulong
BIT ( ulong x, byte n, byte w ) : ulong
BIT ( ushort x, byte n ) : ushort
BIT ( ushort x, byte n, byte w ) : ushort
Clamp ( val, min, max ) : T
FromFixedPoint ( long n, byte decimalBitPrecision = Global.FRAC_PRECISION_BITS ) : double
FromFixedPoint ( ulong n, byte decimalBitPrecision = Global.FRAC_PRECISION_BITS ) : double
InitArray ( uint length, Array defaultData ) : T[][]
InitArray ( Array instance ) : void
InitArray ( Array instance, uint length, Array defaultData ) : void
InitArray ( Array instance, uint x, uint y ) : void
InitList ( uint length, Array defaultData ) : List
LCM ( Array args ) : ulong
SincN ( double x ) : double
ToBinStr ( short n, bool insert_space = true ) : string
ToBool ( byte x ) : bool
ToBool ( int x ) : bool
ToBool ( long x ) : bool
ToBool ( short x ) : bool
ToBool ( uint x ) : bool
ToBool ( ulong x ) : bool
ToBool ( ushort x ) : bool
ToFixedPoint ( float n, byte decimalBitPrecision = Global.FRAC_PRECISION_BITS, bool preserveSignBit = false ) : long
make_bitmask ( int n ) : uint
make_bitmask ( long n ) : ulong

Private Methods

Method Description
Abs ( int n ) : int
Abs ( long n ) : long
Abs ( short n ) : short
BIT ( uint x, byte n, byte w ) : uint
Ctz ( int v ) : int
GCD ( ulong a, ulong b ) : ulong
InverseLerp ( double first, double last, double value ) : double
InverseLerp ( float first, float last, float value ) : float
LCM ( ulong a, ulong b ) : ulong
Lerp ( double value1, double value2, double amount ) : double
Lerp ( float value1, float value2, float amount ) : float
Lerp16 ( int A, int B, int x ) : int
Lerp16 ( short A, short B, short x ) : short
Lerp16 ( ushort A, ushort B, ushort x ) : ushort
Lerp8 ( byte A, byte B, byte x ) : byte
Log10 ( double n ) : double
Log2 ( double n ) : double
Remap ( double value, double inFrom, double inTo, double outFrom, double outTo ) : double
Sign ( int value ) : int
fp_to_linear ( short value ) : Int32
linear_to_fp ( Int32 value ) : short
make_bitmask ( short n ) : ushort
unsigned_bitmask ( byte n ) : byte

Method Details

BIT() public static method

public static BIT ( byte x, byte n, byte w ) : byte
x byte
n byte
w byte
return byte

BIT() public static method

public static BIT ( int x, byte n ) : int
x int
n byte
return int

BIT() public static method

public static BIT ( int x, byte n, byte w ) : int
x int
n byte
w byte
return int

BIT() public static method

public static BIT ( long x, byte n ) : long
x long
n byte
return long

BIT() public static method

public static BIT ( long x, byte n, byte w ) : long
x long
n byte
w byte
return long

BIT() public static method

public static BIT ( short x, byte n ) : short
x short
n byte
return short

BIT() public static method

public static BIT ( short x, byte n, byte w ) : short
x short
n byte
w byte
return short

BIT() public static method

public static BIT ( uint x, byte n ) : uint
x uint
n byte
return uint

BIT() public static method

public static BIT ( ulong x, byte n ) : ulong
x ulong
n byte
return ulong

BIT() public static method

public static BIT ( ulong x, byte n, byte w ) : ulong
x ulong
n byte
w byte
return ulong

BIT() public static method

public static BIT ( ushort x, byte n ) : ushort
x ushort
n byte
return ushort

BIT() public static method

public static BIT ( ushort x, byte n, byte w ) : ushort
x ushort
n byte
w byte
return ushort

Clamp() public static method

public static Clamp ( val, min, max ) : T
return T

FromFixedPoint() public static method

public static FromFixedPoint ( long n, byte decimalBitPrecision = Global.FRAC_PRECISION_BITS ) : double
n long
decimalBitPrecision byte
return double

FromFixedPoint() public static method

public static FromFixedPoint ( ulong n, byte decimalBitPrecision = Global.FRAC_PRECISION_BITS ) : double
n ulong
decimalBitPrecision byte
return double

InitArray() public static method

public static InitArray ( uint length, Array defaultData ) : T[][]
length uint
defaultData Array
return T[][]

InitArray() public static method

public static InitArray ( Array instance ) : void
instance Array
return void

InitArray() public static method

public static InitArray ( Array instance, uint length, Array defaultData ) : void
instance Array
length uint
defaultData Array
return void

InitArray() public static method

public static InitArray ( Array instance, uint x, uint y ) : void
instance Array
x uint
y uint
return void

InitList() public static method

public static InitList ( uint length, Array defaultData ) : List
length uint
defaultData Array
return List

LCM() public static method

public static LCM ( Array args ) : ulong
args Array
return ulong

SincN() public static method

public static SincN ( double x ) : double
x double
return double

ToBinStr() public static method

public static ToBinStr ( short n, bool insert_space = true ) : string
n short
insert_space bool
return string

ToBool() public static method

public static ToBool ( byte x ) : bool
x byte
return bool

ToBool() public static method

public static ToBool ( int x ) : bool
x int
return bool

ToBool() public static method

public static ToBool ( long x ) : bool
x long
return bool

ToBool() public static method

public static ToBool ( short x ) : bool
x short
return bool

ToBool() public static method

public static ToBool ( uint x ) : bool
x uint
return bool

ToBool() public static method

public static ToBool ( ulong x ) : bool
x ulong
return bool

ToBool() public static method

public static ToBool ( ushort x ) : bool
x ushort
return bool

ToFixedPoint() public static method

public static ToFixedPoint ( float n, byte decimalBitPrecision = Global.FRAC_PRECISION_BITS, bool preserveSignBit = false ) : long
n float
decimalBitPrecision byte
preserveSignBit bool
return long

make_bitmask() public static method

public static make_bitmask ( int n ) : uint
n int
return uint

make_bitmask() public static method

public static make_bitmask ( long n ) : ulong
n long
return ulong