C# 클래스 Sparrow.Utils.NumberUtil

파일 보기 프로젝트 열기: fmotagarcia/sparrow-sharp

공개 프로퍼티들

프로퍼티 타입 설명
CosLUT float[]
PIHALF float
PIQUARTER float
SinLUT float[]

공개 메소드들

메소드 설명
Clamp ( float value, float min, float max ) : float
Equals ( float a, float b ) : bool

checks if two numbers are equal with a small margin of error

FastCos ( float angle ) : float

Fast cosinus calculation with a look up table. Note that it is less accurate than Math.Cos; the largest error is around 0.3 degrees;

FastSin ( float angle ) : float

Fast sinus calculation with a look up table. Note that it is less accurate than Math.Sin; the largest error is around 0.3 degrees

NextPowerOfTwo ( float number ) : int
NextPowerOfTwo ( int number ) : int

비공개 메소드들

메소드 설명
NumberUtil ( ) : System

메소드 상세

Clamp() 공개 정적인 메소드

public static Clamp ( float value, float min, float max ) : float
value float
min float
max float
리턴 float

Equals() 공개 정적인 메소드

checks if two numbers are equal with a small margin of error
public static Equals ( float a, float b ) : bool
a float
b float
리턴 bool

FastCos() 공개 정적인 메소드

Fast cosinus calculation with a look up table. Note that it is less accurate than Math.Cos; the largest error is around 0.3 degrees;
public static FastCos ( float angle ) : float
angle float
리턴 float

FastSin() 공개 정적인 메소드

Fast sinus calculation with a look up table. Note that it is less accurate than Math.Sin; the largest error is around 0.3 degrees
public static FastSin ( float angle ) : float
angle float
리턴 float

NextPowerOfTwo() 공개 정적인 메소드

public static NextPowerOfTwo ( float number ) : int
number float
리턴 int

NextPowerOfTwo() 공개 정적인 메소드

public static NextPowerOfTwo ( int number ) : int
number int
리턴 int

프로퍼티 상세

CosLUT 공개적으로 정적으로 프로퍼티

Lookup table for fast cosine calculations
public static float[] CosLUT
리턴 float[]

PIHALF 공개적으로 정적으로 프로퍼티

public static float PIHALF
리턴 float

PIQUARTER 공개적으로 정적으로 프로퍼티

public static float PIQUARTER
리턴 float

SinLUT 공개적으로 정적으로 프로퍼티

Lookup table for fast sine calculations
public static float[] SinLUT
리턴 float[]