MutablePosition

public interface MutablePosition implements ImmutablePosition

Represents a mutable position.

Inheritors

Functions

Link copied to clipboard
public abstract Float deltaX(ImmutablePosition position)

Calculates the difference between the current x and the target position's x-coordinate.

public abstract Float deltaX(Float x)

Calculates the difference between the current x-coordinate and the target x-coordinate.

Link copied to clipboard
public abstract Float deltaY(ImmutablePosition position)

Calculates the difference between the current y and the target position's y-coordinate.

public abstract Float deltaY(Float y)

Calculates the vertical difference between the current y-coordinate and the target y-coordinate.

Link copied to clipboard
public abstract Float getX()

The x coordinate.

Link copied to clipboard
public abstract Float getY()

The y coordinate.

Link copied to clipboard
public abstract Unit negate()

Negates both the x and y coordinates of the mutable position.

Link copied to clipboard
public abstract Unit offset(ImmutablePosition position)

Offsets both the x and y coordinates of the mutable position based on another position.

public abstract Unit offset(Float dx, Float dy)

Offsets both the x and y coordinates of the mutable position by the specified amounts.

Link copied to clipboard
public abstract Unit set(ImmutablePosition position)

Sets the x and y coordinates of the mutable position based on another position.

public abstract Unit set(Float x, Float y)

Sets the x and y coordinates of the mutable position.

Link copied to clipboard
public abstract Unit setX(Float x)

The x coordinate.

Link copied to clipboard
public abstract Unit setY(Float y)

The y coordinate.

Link copied to clipboard
public abstract ImmutablePosition toImmutable()

Initializes a ImmutablePosition with the current x and y coordinates.

Link copied to clipboard
public abstract Unit xOffset(Float dx)

Offsets the x-coordinate of the mutable position by the specified amount.

Link copied to clipboard
public abstract Unit yOffset(Float dy)

Offsets the y-coordinate of the mutable position by the specified amount.