Size

class Size

A width and height pair that denote a rectangular area.

Author

Nicholas Eddy

Constructors

Link copied to clipboard
constructor(width: Int = 0, height: Int = width)
constructor(width: Float = 0.0f, height: Float = width)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The area represented: width * height

Link copied to clipboard

true IFF area == 0

Link copied to clipboard

Vertical extent; not negative

Link copied to clipboard
val width: Double = 0.0

Horizontal extent; not negative

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
operator fun Size.div(value: Double): Size
operator fun Size.div(value: Float): Size

operator fun Size.div(value: Int): Size

Returns a Size with width / value and height / value

Link copied to clipboard
operator fun Size.times(value: Double): Size
operator fun Size.times(value: Float): Size

operator fun Size.times(value: Int): Size

Returns a Size with width * value and height * value