Package uk.ac.qmul.eecs.depic.patterns
Class MathUtils
- java.lang.Object
-
- uk.ac.qmul.eecs.depic.patterns.MathUtils
-
public class MathUtils extends java.lang.Object
Utilities for math operations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
MathUtils.Interpolate
Calculates values at any time in a sequence by interpolating the sequence values.static class
MathUtils.Scale
Scales a float from one range of values to another.
-
Constructor Summary
Constructors Constructor and Description MathUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static boolean
equal(double a, double b)
static boolean
equal(double a, double b, double epsilon)
static boolean
equal(float a, float b)
static boolean
equal(float a, float b, float epsilon)
static float
toAmp(float db)
static float
toDb(float amp)
-
-
-
Method Detail
-
equal
public static boolean equal(float a, float b)
-
equal
public static boolean equal(double a, double b)
-
equal
public static boolean equal(float a, float b, float epsilon)
-
equal
public static boolean equal(double a, double b, double epsilon)
-
toDb
public static float toDb(float amp)
- Parameters:
amp
- amplitude value in the normalized form (ranging from 0 to 1)- Returns:
- the decibel conversion of
amp
-
toAmp
public static float toAmp(float db)
-
-