Package me.wobblyyyy.pathfinder.math
Class AbsMax
java.lang.Object
me.wobblyyyy.pathfinder.math.AbsMax
public class AbsMax
extends java.lang.Object
Additional math utilities for getting the absolute maximum of a set of data.
This is mostly useful in speed and state normalization.
- Since:
- 0.5.0
- Author:
- Colin Robertson
-
Constructor Summary
Constructors Constructor Description AbsMax()
-
Method Summary
Modifier and Type Method Description static double
getAbsoluteMax(double... values)
Get the maximum absolute value of the provided numbers.static double
of(double... values)
Get the maximum absolute value of the provided numbers.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AbsMax
public AbsMax()
-
-
Method Details
-
getAbsoluteMax
public static double getAbsoluteMax(double... values)Get the maximum absolute value of the provided numbers.Example A:
- Inputs: 10, -15, 20, 30
- Output: 30
Example B:
- Inputs: -130, 20, 10, 30
- Output: 130
- Parameters:
values
- the values to find the absolute maximum of.- Returns:
- the absolute maximum of the provided values.
-
of
public static double of(double... values)Get the maximum absolute value of the provided numbers. This method callsgetAbsoluteMax(double...)
.Example A:
- Inputs: 10, -15, 20, 30
- Output: 30
Example B:
- Inputs: -130, 20, 10, 30
- Output: 130
- Parameters:
values
- the values to find the absolute maximum of.- Returns:
- the absolute maximum of the provided values.
-