クラス FMath

math wrapper and convenience functions [詳細]

すべてのメンバ一覧

Static Public メソッド

static float Radians (float x)
 convert from degrees to radians
static float Degrees (float x)
 convert from radians to degrees
static float Sin (float x)
 equivalent to (float)Math.Sin(x)
static float Cos (float x)
 equivalent to (float)Math.Cos(x)
static float Tan (float x)
 equivalent to (float)Math.Tan(x)
static float Asin (float x)
 equivalent to (float)Math.Asin(x)
static float Acos (float x)
 equivalent to (float)Math.Acos(x)
static float Atan (float x)
 equivalent to (float)Math.Atan(x)
static float Atan2 (float x, float y)
 equivalent to (float)Math.Atan2(x,y)
static float Sqrt (float x)
 equivalent to (float)Math.Sqrt(x)
static float Pow (float x, float y)
 equivalent to (float)Math.Pow(x,y)
static float Exp (float x)
 equivalent to (float)Math.Exp(x)
static float Log (float x)
 equivalent to (float)Math.Log(x)
static float Log10 (float x)
 equivalent to (float)Math.Log10(x)
static float Abs (float x)
 equivalent to Math.Abs(x)
static int Sign (float x)
 equivalent to Math.Sign(x)
static float Min (float x, float y)
 equivalent to Math.Min(x,y)
static float Max (float x, float y)
 equivalent to Math.Max(x,y)
static float Floor (float x)
 equivalent to (float)Math.Floor(x)
static float Ceiling (float x)
 equivalent to (float)Math.Ceiling(x)
static float Round (float x)
 equivalent to (float)Math.Round(x)
static float Truncate (float x)
 equivalent to (float)Math.Truncate(x)
static float Clamp (float x, float min, float max)
 clamp between two values
static float Repeat (float x, float min, float max)
 repeat between two values
static float Mirror (float x, float min, float max)
 repeat shuttlewise between two values
static float Lerp (float x1, float x2, float f)
 lerp between two values
static float MoveTo (float x1, float x2, float amount)
 move one value to another value by specified amount
static float Step (float edge, float x)
 step function returning 0 or 1
static float LinearStep (float min, float max, float x)
 linear step function returning a value between 0 and 1
static float SmoothStep (float min, float max, float x)
 smooth step function returning a value between 0 and 1

Public 変数

const float E = (float)Math.E
 E.
const float PI = (float)Math.PI
 PI.
const float DegToRad = (float)( Math.PI / 180.0 )
 conversion ratio from degrees to radians
const float RadToDeg = (float)( 180.0 / Math.PI )
 conversion ratio from radians to degrees

説明

math wrapper and convenience functions


メソッド

static float Abs ( float  x) [static]

equivalent to Math.Abs(x)

引数:
xthe value to take the absolute value of
戻り値:
the absolute value of x
static float Acos ( float  x) [static]

equivalent to (float)Math.Acos(x)

引数:
xthe value to take the acos of
戻り値:
the acos of x
static float Asin ( float  x) [static]

equivalent to (float)Math.Asin(x)

引数:
xthe value to take the asin of
戻り値:
the asin of x
static float Atan ( float  x) [static]

equivalent to (float)Math.Atan(x)

引数:
xthe value to take the atan of
戻り値:
the atan of x
static float Atan2 ( float  x,
float  y 
) [static]

equivalent to (float)Math.Atan2(x,y)

引数:
xthe x coordinate to take the atan2 of
ythe y coordinate to take the atan2 of
戻り値:
the atan2 of (x,y)
static float Ceiling ( float  x) [static]

equivalent to (float)Math.Ceiling(x)

引数:
xthe value to take the ceil of
戻り値:
the ceil of x
static float Clamp ( float  x,
float  min,
float  max 
) [static]

clamp between two values

引数:
xthe value to clamp
minthe min to clamp against
maxthe max to clamp against
戻り値:
x clamped between min and max
static float Cos ( float  x) [static]

equivalent to (float)Math.Cos(x)

引数:
xthe value to take the cos of
戻り値:
the cos of x
static float Degrees ( float  x) [static]

convert from radians to degrees

引数:
xthe value to convert
戻り値:
value converted from radians to degrees
static float Exp ( float  x) [static]

equivalent to (float)Math.Exp(x)

引数:
xthe value to take the exp of
戻り値:
the exp of x
static float Floor ( float  x) [static]

equivalent to (float)Math.Floor(x)

引数:
xthe value to take the floor of
戻り値:
the floor of x
static float Lerp ( float  x1,
float  x2,
float  f 
) [static]

lerp between two values

引数:
x1value 1
x2value 2
flerp amount
戻り値:
the result of lerping f between x1 and x2
static float LinearStep ( float  min,
float  max,
float  x 
) [static]

linear step function returning a value between 0 and 1

引数:
minthe min to be compared
maxthe max to be compared
xthe value to be compared
戻り値:
0.0f if x<min, 1.0f if x>max, linearly interpolated if min<=x<=max
static float Log ( float  x) [static]

equivalent to (float)Math.Log(x)

引数:
xthe value to take the log of
戻り値:
the log of x
static float Log10 ( float  x) [static]

equivalent to (float)Math.Log10(x)

引数:
xthe value to take the log 10 of
戻り値:
the log 10 of x
static float Max ( float  x,
float  y 
) [static]

equivalent to Math.Max(x,y)

引数:
xfirst input to max
ysecond input to max
戻り値:
the max of x and y
static float Min ( float  x,
float  y 
) [static]

equivalent to Math.Min(x,y)

引数:
xfirst input to min
ysecond input to min
戻り値:
the min of x and y
static float Mirror ( float  x,
float  min,
float  max 
) [static]

repeat shuttlewise between two values

引数:
xthe value to repeat
minthe min to repeat over
maxthe max to repeat over
戻り値:
x repeated shuttlewise between min and max
static float MoveTo ( float  x1,
float  x2,
float  amount 
) [static]

move one value to another value by specified amount

引数:
x1value 1
x2value 2
amountstep amount
戻り値:
value moved to another value by specified amount
static float Pow ( float  x,
float  y 
) [static]

equivalent to (float)Math.Pow(x,y)

引数:
xthe value to raise
ythe power to raise to
戻り値:
x to y power
static float Radians ( float  x) [static]

convert from degrees to radians

引数:
xthe value to convert
戻り値:
value converted from degrees to radians
static float Repeat ( float  x,
float  min,
float  max 
) [static]

repeat between two values

引数:
xthe value to repeat
minthe min to repeat over
maxthe max to repeat over
戻り値:
x repeated between min and max
static float Round ( float  x) [static]

equivalent to (float)Math.Round(x)

引数:
xthe value to take the round of
戻り値:
the round of x
static int Sign ( float  x) [static]

equivalent to Math.Sign(x)

引数:
xthe value to take the sign of
戻り値:
the sign of x
static float Sin ( float  x) [static]

equivalent to (float)Math.Sin(x)

引数:
xthe value to take the sin of
戻り値:
the sin of x
static float SmoothStep ( float  min,
float  max,
float  x 
) [static]

smooth step function returning a value between 0 and 1

引数:
minthe min to be compared
maxthe max to be compared
xthe value to be compared
戻り値:
0.0f if x<min, 1.0f if x>max, smoothly interpolated if min<=x<=max
static float Sqrt ( float  x) [static]

equivalent to (float)Math.Sqrt(x)

引数:
xthe value to take the square root of
戻り値:
the square root of x
static float Step ( float  edge,
float  x 
) [static]

step function returning 0 or 1

引数:
edgethe edge to be compared
xthe value to be compared
戻り値:
0.0f if x<edge, 1.0f if x>=edge
static float Tan ( float  x) [static]

equivalent to (float)Math.Tan(x)

引数:
xthe value to take the tan of
戻り値:
the tan of x
static float Truncate ( float  x) [static]

equivalent to (float)Math.Truncate(x)

引数:
xthe value to take the trunc of
戻り値:
the trunc of x

変数

const float DegToRad = (float)( Math.PI / 180.0 )

conversion ratio from degrees to radians

const float E = (float)Math.E

E.

const float PI = (float)Math.PI

PI.

const float RadToDeg = (float)( 180.0 / Math.PI )

conversion ratio from radians to degrees