public class MathUtils
extends java.lang.Object
Constructor and Description |
---|
MathUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
applyGrowthAccordingDistanceToPerimeter(float[][] surface)
Creates tents for the surface.
|
static float[][] |
avgFilter(float[][] surface,
int radio) |
static void |
fillSurfaceHoles(float[][] surface) |
private static int |
getIndex(int x,
int maxX) |
static float[][] |
increaseEmptyArea(float[][] inputArea,
double scale)
Adds an empty area, maintaining the island size.
|
static int |
mod(int x,
int m) |
static void |
normalise(float[][] surface)
Normalises the surface, to be able to easily compare surfaces with different tent heights.
|
static void |
planeSurface(float[][] surface) |
static float[][] |
scale(float[][] originalSurface,
double scale)
|
static float[][] |
scale(float[][] originalSurface,
int factor)
Given an original surface it reduces by the given factor.
|
static double |
truncate(double value,
int decimals) |
public static int mod(int x, int m)
public static double truncate(double value, int decimals)
public static void fillSurfaceHoles(float[][] surface)
public static void applyGrowthAccordingDistanceToPerimeter(float[][] surface)
surface
- island surfacepublic static void planeSurface(float[][] surface)
public static void normalise(float[][] surface)
surface
- private static int getIndex(int x, int maxX)
public static float[][] avgFilter(float[][] surface, int radio)
public static float[][] increaseEmptyArea(float[][] inputArea, double scale)
:::::::::::::::::::::::::
:::::::::::::::::::::::::
::::@::@.::::::::::::::::
::::`@@@:::@@@:::::::::::
:::::;@@@:::@';::::::;@::
::::::,@@@;;.@+;:#`@@@,::
::::::::+@@@ +@:.@@';@@':
:::::::::+@@@@@@@#@:::..:
:::::::::+ ,@'+# @@+:::::
::::::::::@@@@,+.::::::::
:::::::::::@+#:::::::::::
::::::::;@@@@::::::::::::
::::::::::;@@::::::::::::
:::::::::::::::::::::::::
:::::::::::::::::::::::::
:::::::::::::::::::::::::
into this filled one:
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::@::::::::::::::::::::::::::::::
::::::::::::::::,@:;@:::::::::::::::::::::::::::::
:::::::::::::::::'@@.:::+@::::::::,.::::::::::::::
:::::::::::::::::::@@@@::@+@:::@@@@@::::::::::::::
::::::::::::::::::::'@@@+ @.:@@@@'@.::::::::::::::
::::::::::::::::::::::@@@@@;@@@:::#@::::::::::::::
:::::::::::::::::::::.@ @@@@ @@@::::::::::::::::::
::::::::::::::::::::::#@@@:@@::;::::::::::::::::::
::::::::::::::::::::::::@@::::::::::::::::::::::::
::::::::::::::::::::.@+@@:::::::::::::::::::::::::
:::::::::::::::::::::'@@@,::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
inputArea
- input areascale
- how much is going to increase (must be > 1)public static float[][] scale(float[][] originalSurface, int factor)
originalSurface
- factor
- public static float[][] scale(float[][] originalSurface, double scale)
originalSurface
- scale
-