Vector2F

data class Vector2F(val x: Float, val y: Float)

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val x: Float
Link copied to clipboard
val y: Float

Functions

Link copied to clipboard
fun angle(up: Vector2D = Vector2D.UP): Angle
Link copied to clipboard
fun angleTo(other: Vector2F, up: Vector2D = Vector2D.UP): Angle
Link copied to clipboard
Link copied to clipboard
fun ceil(): Vector2F
Link copied to clipboard
Link copied to clipboard
fun copy(x: Double = this.x.toDouble(), y: Double = this.y.toDouble()): Vector2F
Link copied to clipboard
infix fun cross(that: Vector2F): Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline operator fun div(that: Size): Vector2F
inline operator fun div(that: Vector2F): Vector2F
inline operator fun div(scale: Double): Vector2F
inline operator fun div(scale: Float): Vector2F
inline operator fun div(scale: Int): Vector2F
Link copied to clipboard
operator fun Vector2F.div(other: Scale): Vector2F
operator fun Vector2F.div(other: Size): Vector2F
operator fun Vector2F.div(other: SizeInt): Vector2F
Link copied to clipboard
infix fun dot(that: Vector2F): Float
Link copied to clipboard
Link copied to clipboard
operator fun get(component: Int): Float
Link copied to clipboard
fun interpolateWith(ratio: Ratio, other: Vector2F): Vector2F
Link copied to clipboard
fun inv(): Vector2F

Vector2 with inverted (1f / v) components to this

Link copied to clipboard
fun isAlmostEquals(other: Vector2F, epsilon: Float = 1.0E-5f): Boolean
Link copied to clipboard
fun isNaN(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline operator fun minus(that: Size): Vector2F
inline operator fun minus(that: Vector2F): Vector2F
Link copied to clipboard
operator fun Vector2F.minus(other: Size): Vector2F
operator fun Vector2F.minus(other: SizeInt): Vector2F
Link copied to clipboard
fun niceStr(decimalPlaces: Int): String
Link copied to clipboard
inline operator fun plus(that: Size): Vector2F
inline operator fun plus(that: Vector2F): Vector2F
Link copied to clipboard
operator fun Vector2F.plus(other: Size): Vector2F
operator fun Vector2F.plus(other: SizeInt): Vector2F
Link copied to clipboard
Link copied to clipboard
inline operator fun rem(that: Size): Vector2F
inline operator fun rem(that: Vector2F): Vector2F
inline operator fun rem(scale: Double): Vector2F
inline operator fun rem(scale: Float): Vector2F
inline operator fun rem(scale: Int): Vector2F
Link copied to clipboard
operator fun Vector2F.rem(other: Scale): Vector2F
operator fun Vector2F.rem(other: Size): Vector2F
operator fun Vector2F.rem(other: SizeInt): Vector2F
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline operator fun times(that: Scale): Vector2F
inline operator fun times(that: Size): Vector2F
inline operator fun times(that: Vector2F): Vector2F
inline operator fun times(scale: Double): Vector2F
inline operator fun times(scale: Float): Vector2F
inline operator fun times(scale: Int): Vector2F
Link copied to clipboard
operator fun Vector2F.times(other: Scale): Vector2F
operator fun Vector2F.times(other: Size): Vector2F
operator fun Vector2F.times(other: SizeInt): Vector2F
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Normal vector. Rotates the vector/point -90 degrees (not normalizing it)

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
inline fun transformed(m: Matrix): Vector2F
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline operator fun unaryMinus(): Vector2F
Link copied to clipboard
inline operator fun unaryPlus(): Vector2F