FloatSize2d


public final class FloatSize2d


2D size represented as a Float (e.g., panel dimensions in meters).

Summary

Public constructors

FloatSize2d(float width, float height)

Public methods

final @NonNull FloatSize2d
div(float divisor)

Returns a new FloatSize2d that's uniformly divided by the divisor.

final @NonNull FloatSize2d
div(int divisor)

Returns a new FloatSize2d that's uniformly divided by the divisor.

boolean
equals(Object other)
final float

the height of the object

final float

the width of the object

int
final @NonNull FloatSize2d
times(float scalar)

Returns a new FloatSize2d that's uniformly multiplied by the scalar.

final @NonNull FloatSize2d
times(int scalar)

Returns a new FloatSize2d that's uniformly multiplied by the scalar.

final @NonNull FloatSize3d
to3d(float depth)

Converts to FloatSize3d using width, height, and the given depth.

@NonNull String

Public constructors

FloatSize2d

Added in 1.0.0
public FloatSize2d(float width, float height)

Public methods

div

Added in 1.0.0
public final @NonNull FloatSize2d div(float divisor)

Returns a new FloatSize2d that's uniformly divided by the divisor.

Parameters
float divisor

the value to divide the width and height by

Returns
@NonNull FloatSize2d

a new FloatSize2d with the divided dimensions

div

Added in 1.0.0
public final @NonNull FloatSize2d div(int divisor)

Returns a new FloatSize2d that's uniformly divided by the divisor.

Parameters
int divisor

the value to divide the width and height by

Returns
@NonNull FloatSize2d

a new FloatSize2d with the divided dimensions

equals

public boolean equals(Object other)

getHeight

Added in 1.0.0
public final float getHeight()

the height of the object

getWidth

Added in 1.0.0
public final float getWidth()

the width of the object

hashCode

public int hashCode()

times

Added in 1.0.0
public final @NonNull FloatSize2d times(float scalar)

Returns a new FloatSize2d that's uniformly multiplied by the scalar.

Parameters
float scalar

the value to multiply the width and height by

Returns
@NonNull FloatSize2d

a new FloatSize2d with the multiplied dimensions

times

Added in 1.0.0
public final @NonNull FloatSize2d times(int scalar)

Returns a new FloatSize2d that's uniformly multiplied by the scalar.

Parameters
int scalar

the value to multiply the width and height by

Returns
@NonNull FloatSize2d

a new FloatSize2d with the multiplied dimensions

to3d

Added in 1.0.0
public final @NonNull FloatSize3d to3d(float depth)

Converts to FloatSize3d using width, height, and the given depth.

Parameters
float depth

the depth of the new 3D size

Returns
@NonNull FloatSize3d

a new FloatSize3d with the specified dimensions

toString

public @NonNull String toString()