Mathf Flashcards
1
Q
Mathf.Min
Mathf.Min(1.2, 2.4));
A
Returns the smallest of two or more values.
2
Q
Mathf.Max
Mathf.Max(1.2, 2.4));
A
Returns largest of two or more values.
3
Q
Mathf.Clamp
transform.position = new Vector3(Mathf.Clamp(Time.time, 1.0F, 3.0F), 0, 0);
A
Clamps a value between a minimum float and maximum float value.
4
Q
Mathf.Abs
Mathf.Abs(-10.5));
A
Returns the absolute value of f.
5
Q
Mathf.Pow
Mathf.Pow(6, 1.8F));
A
Returns f raised to power p.
example:
Mathf.Pow(5,2)); = 25