Class Dimension.Mix
java.lang.Object
dev.prozilla.pine.common.math.dimension.DimensionBase
dev.prozilla.pine.common.math.dimension.DimensionComparator
dev.prozilla.pine.common.math.dimension.Dimension.Mix
- All Implemented Interfaces:
Cloneable<DimensionBase>
,Printable
- Enclosing class:
Dimension
-
Field Summary
FieldsFields inherited from class dev.prozilla.pine.common.math.dimension.DimensionComparator
dimensionA, dimensionB, isDirty
Fields inherited from class dev.prozilla.pine.common.math.dimension.DimensionBase
computedValue, DEFAULT_DIRTY
-
Constructor Summary
ConstructorsConstructorDescriptionMix
(DimensionBase dimensionA, DimensionBase dimensionB) Mix
(DimensionBase dimensionA, DimensionBase dimensionB, float factor) Creates a function that returns the mix of the values of two dimensions based on a factor. -
Method Summary
Methods inherited from class dev.prozilla.pine.common.math.dimension.DimensionComparator
equals, has, isDirty, recompute
Methods inherited from class dev.prozilla.pine.common.math.dimension.DimensionBase
compute, equals, getUnit, hashCode
-
Field Details
-
factor
protected float factor
-
-
Constructor Details
-
Mix
-
Mix
Creates a function that returns the mix of the values of two dimensions based on a factor.
-
-
Method Details
-
compare
protected float compare(float valueA, float valueB) Description copied from class:DimensionComparator
Compares the values of both dimensions stored in this comparator.- Specified by:
compare
in classDimensionComparator
- Returns:
- The result of this comparator function.
-
clone
Description copied from class:DimensionBase
Returns a clone of this dimension.- Specified by:
clone
in interfaceCloneable<DimensionBase>
- Specified by:
clone
in classDimensionBase
- Returns:
- New dimension instance
-
getFactor
public float getFactor() -
setFactor
public void setFactor(float factor) -
toString
Description copied from class:DimensionBase
Returns the string representation of this dimension.- Specified by:
toString
in interfacePrintable
- Specified by:
toString
in classDimensionBase
- Returns:
- String representation of this object.
-