Mathf

struct in UnityEngine

マニュアルに切り替える

説明

一般的な数学関数を扱います。

Static 変数

Deg2RadDegrees-to-radians conversion constant (Read Only).
EpsilonA tiny floating point value (Read Only).
InfinityA representation of positive infinity (Read Only).
NegativeInfinityA representation of negative infinity (Read Only).
PIThe infamous 3.14159265358979... value (Read Only).
Rad2DegRadians-to-degrees conversion constant (Read Only).

Static 関数

Abs/f/の絶対値を返す。
Acos f のアークコサイン (コサインの値が f になる、ラジアンで表された角度) を返します。
ApproximatelyCompares two floating point values if they are similar.
Asin f のアークサイン (サインの値が f になる、ラジアンで表された角度) を返します。
Atan f のアークタンジェント (タンジェントの値が f になる、ラジアンで表された角度) を返します。
Atan2 Tan が y/x になる角度をラジアンで返します。
CeilReturns the smallest integer greater to or equal to f.
CeilToIntReturns the smallest integer greater to or equal to f.
ClampClamps a value between a minimum float and maximum float value.
Clamp01Clamps value between 0 and 1 and returns value.
ClosestPowerOfTwoReturns the closest power of two value.
Cosラジアンで表された角度 f のコサイン (余弦) を返します。
DeltaAngleCalculates the shortest difference between two given angles given in degrees.
ExpReturns e raised to the specified power.
FloorReturns the largest integer smaller to or equal to f.
FloorToIntReturns the largest integer smaller to or equal to f.
GammaToLinearSpaceConverts the given value from gamma (sRGB) to linear color space.
InverseLerpCalculates the linear parameter t that produces the interpolant value within the range [a, b].
IsPowerOfTwoReturns true if the value is power of two.
LerpLinearly interpolates between a and b by t.
LerpAngleSame as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees.
LerpUnclampedLinearly interpolates between a and b by t with no limit to t.
LinearToGammaSpaceConverts the given value from linear to gamma (sRGB) color space.
LogReturns the logarithm of a specified number in a specified base.
Log10Returns the base 10 logarithm of a specified number.
MaxReturns largest of two or more values.
MinReturns the smallest of two or more values.
MoveTowardsMoves a value current towards target.
MoveTowardsAngleSame as MoveTowards but makes sure the values interpolate correctly when they wrap around 360 degrees.
NextPowerOfTwoReturns the next power of two value.
PerlinNoiseGenerate 2D Perlin noise.
PingPongPingPongs the value t, so that it is never larger than length and never smaller than 0.
PowReturns f raised to power p.
RepeatLoops the value t, so that it is never larger than length and never smaller than 0.
RoundReturns f rounded to the nearest integer.
RoundToIntReturns f rounded to the nearest integer.
SignReturns the sign of f.
Sinラジアンで表された角度 f のサイン (正弦) を返します。
SmoothDampGradually changes a value towards a desired goal over time.
SmoothDampAngleGradually changes an angle given in degrees towards a desired goal angle over time.
SmoothStepInterpolates between min and max with smoothing at the limits.
Sqrt f の平方根を返します。
Tanラジアンで表された角度 f のタンジェントを返します。