FloatSize2d


class FloatSize2d


Size of a 2d object represented as a Float, such as the dimensions of a panel in meters.

Summary

Public constructors

FloatSize2d(width: Float, height: Float)

Public functions

operator FloatSize2d
div(divisor: Float)

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

operator FloatSize2d
div(divisor: Int)

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

open operator Boolean
equals(other: Any?)
open Int
operator FloatSize2d
times(scalar: Float)

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

operator FloatSize2d
times(scalar: Int)

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

FloatSize3d
to3d(depth: Float)

Returns a new FloatSize3d with the same width and height of this FloatSize2d, and the given depth.

open String

Public properties

Float

the height of the object

Float

the width of the object

Public constructors

FloatSize2d

Added in 1.0.0-alpha10
FloatSize2d(width: Float = 0.0f, height: Float = 0.0f)

Public functions

div

Added in 1.0.0-alpha10
operator fun div(divisor: Float): FloatSize2d

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

Parameters
divisor: Float

the value to divide the width and height by

Returns
FloatSize2d

a new FloatSize2d with the divided dimensions

div

Added in 1.0.0-alpha10
operator fun div(divisor: Int): FloatSize2d

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

Parameters
divisor: Int

the value to divide the width and height by

Returns
FloatSize2d

a new FloatSize2d with the divided dimensions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

times

Added in 1.0.0-alpha10
operator fun times(scalar: Float): FloatSize2d

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

Parameters
scalar: Float

the value to multiply the width and height by

Returns
FloatSize2d

a new FloatSize2d with the multiplied dimensions

times

Added in 1.0.0-alpha10
operator fun times(scalar: Int): FloatSize2d

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

Parameters
scalar: Int

the value to multiply the width and height by

Returns
FloatSize2d

a new FloatSize2d with the multiplied dimensions

to3d

Added in 1.0.0-alpha10
fun to3d(depth: Float = 0.0f): FloatSize3d

Returns a new FloatSize3d with the same width and height of this FloatSize2d, and the given depth.

Parameters
depth: Float = 0.0f

the depth of the new 3D size

Returns
FloatSize3d

a new FloatSize3d with the specified dimensions

toString

open fun toString(): String

Public properties

height

Added in 1.0.0-alpha10
val heightFloat

the height of the object

width

Added in 1.0.0-alpha10
val widthFloat

the width of the object