Record Class WorldDistanceScaling
java.lang.Object
java.lang.Record
com.render.api.world.WorldDistanceScaling
public record WorldDistanceScaling(float baseScale, float referenceDistance, float minScale, float maxScale)
extends Record
Distance-aware scale policy used by text, images, and waypoints.
-
Constructor Summary
ConstructorsConstructorDescriptionWorldDistanceScaling(float baseScale, float referenceDistance, float minScale, float maxScale) Creates an instance of aWorldDistanceScalingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thebaseScalerecord component.final booleanIndicates whether some other object is "equal to" this one.static WorldDistanceScalingfixed(float scale) final inthashCode()Returns a hash code value for this object.floatmaxScale()Returns the value of themaxScalerecord component.floatminScale()Returns the value of theminScalerecord component.floatReturns the value of thereferenceDistancerecord component.floatscale(double distance) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WorldDistanceScaling
public WorldDistanceScaling(float baseScale, float referenceDistance, float minScale, float maxScale) Creates an instance of aWorldDistanceScalingrecord class.- Parameters:
baseScale- the value for thebaseScalerecord componentreferenceDistance- the value for thereferenceDistancerecord componentminScale- the value for theminScalerecord componentmaxScale- the value for themaxScalerecord component
-
-
Method Details
-
fixed
-
scale
public float scale(double distance) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
baseScale
public float baseScale()Returns the value of thebaseScalerecord component.- Returns:
- the value of the
baseScalerecord component
-
referenceDistance
public float referenceDistance()Returns the value of thereferenceDistancerecord component.- Returns:
- the value of the
referenceDistancerecord component
-
minScale
public float minScale()Returns the value of theminScalerecord component.- Returns:
- the value of the
minScalerecord component
-
maxScale
public float maxScale()Returns the value of themaxScalerecord component.- Returns:
- the value of the
maxScalerecord component
-