Package rekit.util
Class CalcUtil
java.lang.Object
rekit.util.CalcUtil
This class contains several methods to calculate between units.
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
randomize
(double mu, double sigma) Randomize a value.static float
randomize
(float mu, float sigma) Randomize a value.static int
units2pixel
(float units) Units to Pixels.static Vec
units2pixel
(Vec pos) Units to Pixels.
-
Method Details
-
units2pixel
public static int units2pixel(float units) Units to Pixels.- Parameters:
units
- the units- Returns:
- the pixels
-
units2pixel
Units to Pixels.- Parameters:
pos
- the position- Returns:
- the position in units
-
randomize
public static double randomize(double mu, double sigma) Randomize a value.- Parameters:
mu
- the valuesigma
- the sigma- Returns:
- the randomized value
-
randomize
public static float randomize(float mu, float sigma) Randomize a value.- Parameters:
mu
- the valuesigma
- the sigma- Returns:
- the randomized value
-