Boks2D
Toggle table of contents
0.1.1
common
Target filter
common
Switch theme
Search in API
Skip to content
Boks2D
Boks2D
/
io.github.joaomcl.boks2d.math
/
Vec2
Vec2
data
class
Vec2
(
val
x
:
Float
,
val
y
:
Float
)
2D vector for physics calculations.
Members
Constructors
Vec2
Link copied to clipboard
constructor
(
x
:
Float
,
y
:
Float
)
Types
Companion
Link copied to clipboard
object
Companion
Properties
x
Link copied to clipboard
val
x
:
Float
y
Link copied to clipboard
val
y
:
Float
Functions
cross
Link copied to clipboard
fun
cross
(
other
:
Vec2
)
:
Float
div
Link copied to clipboard
operator
fun
div
(
scalar
:
Float
)
:
Vec2
dot
Link copied to clipboard
fun
dot
(
other
:
Vec2
)
:
Float
length
Link copied to clipboard
fun
length
(
)
:
Float
length
Squared
Link copied to clipboard
fun
lengthSquared
(
)
:
Float
minus
Link copied to clipboard
operator
fun
minus
(
other
:
Vec2
)
:
Vec2
normalized
Link copied to clipboard
fun
normalized
(
)
:
Vec2
plus
Link copied to clipboard
operator
fun
plus
(
other
:
Vec2
)
:
Vec2
times
Link copied to clipboard
operator
fun
times
(
scalar
:
Float
)
:
Vec2
unary
Minus
Link copied to clipboard
operator
fun
unaryMinus
(
)
:
Vec2