DoubleOffset

data class DoubleOffset(val x: Double, val y: Double)(source)

An immutable finite two-dimensional coordinate or displacement.

The value owns no external resources and is safe to share between threads. Arithmetic creates another validated value and fails when a result is not finite.

Throws

when either component is not finite.

Constructors

Link copied to clipboard
constructor(x: Double, y: Double)

Types

Link copied to clipboard
object Companion

Common coordinate constants.

Properties

Link copied to clipboard
val x: Double

horizontal coordinate or displacement.

Link copied to clipboard
val y: Double

vertical coordinate or displacement.

Functions

Link copied to clipboard
operator fun minus(other: DoubleOffset): DoubleOffset

Subtracts a finite displacement.

Link copied to clipboard
operator fun plus(other: DoubleOffset): DoubleOffset

Adds a finite displacement.