toyGraphics / com.anysolo.toyGraphics.vector / Vector

Vector

data class Vector

2D vector.

Constructors

<init>

Vector(x: Int, y: Int)Vector(x: Double, y: Double)

2D vector.

Properties

x

val x: Double

y

val y: Double

Functions

div

operator fun div(n: Double): Vector
operator fun div(n: Int): Vector

minus

operator fun minus(v2: Vector): Vector

plus

operator fun plus(v2: Vector): Vector

times

operator fun times(n: Double): Vector
operator fun times(n: Int): Vector

unaryMinus

operator fun unaryMinus(): Vector