API Docs for: 0.1.1
Show:

Vector2d Class

Module: Joy

Constructor

Vector2d

(
  • x
  • y
)

Parameters:

  • x Number
  • y Number

Item Index

Attributes

Methods

clone

() Vector2d

Returns:

scale

(
  • x
  • y
)
Vector2d

Parameters:

  • x Number

    (or x y)

  • y Number

Returns:

set

(
  • x
  • y
)
Vector2d

Parameters:

  • x Number
  • y Number

Returns:

sum

(
  • vector2d
)
Vector2d

Parameters:

Returns:

sum

(
  • vector2d
)
Vector2d

Parameters:

Returns:

toString

() String

Returns:

String:

Attributes

length

readonly

Get the magnitude of this vector

normalized

readonly

Get this vector with a magnitude of 1.