Package org.polyfrost.polyui.unit
Class Vec2.Immutable
-
- All Implemented Interfaces:
-
kotlin.Cloneable,kotlin.Comparable
public final class Vec2.Immutable extends Vec2
Immutable Vec2 wrapper. Attempts to set will result in a compilation error in Kotlin, and an UnsupportedOperationException.
-
-
Constructor Summary
Constructors Constructor Description Vec2.Immutable(Float x, Float y)
-
Method Summary
Modifier and Type Method Description FloatgetX()UnitsetX(Float x)FloatgetY()UnitsetY(Float y)FloatgetMagnitude2()Magnitude² (squared) of the vector FloatgetMagnitude()Magnitude of the vector. Vec2.Immutableclone()-
Methods inherited from class org.polyfrost.polyui.unit.Vec2
compareTo, compareTo, divAssign, ensureLargerThan, ensureSmallerThan, equals, get, getHasZero, getHeight, getWidth, hashCode, isNegative, isZero, max, min, minusAssign, normalize, plusAssign, resize, scale, set, set, setHeight, setWidth, timesAssign, timesAssign, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
setX
@Deprecated(message = "Cannot set immutable Vec2", level = DeprecationLevel.ERROR) Unit setX(Float x)
-
setY
@Deprecated(message = "Cannot set immutable Vec2", level = DeprecationLevel.ERROR) Unit setY(Float y)
-
getMagnitude2
Float getMagnitude2()
Magnitude² (squared) of the vector
-
getMagnitude
Float getMagnitude()
Magnitude of the vector.
-
clone
Vec2.Immutable clone()
-
-
-
-