Preparing search index...
The search index is not available
@mauricioroberto/math-world
@mauricioroberto/math-world
Vector2D
Class Vector2D
Hierarchy
Vector2D
Implements
default
Index
Constructors
constructor
Properties
_x
_y
Accessors
x
y
Methods
add
addX
addY
added
addedX
addedY
angle
In
Degrees
angle
In
Radians
clone
direction
div
divided
dot
fix
fixed
from
Point
getX
getY
is
Equal
log
magnitude
mult
normalize
normalized
round
rounded
scale
scaled
set
setX
setY
sub
subX
subY
subtracted
subtractedX
subtractedY
to
Point
to
String
from
Point
Constructors
constructor
new
Vector2D
(
x
?
,
y
?
)
:
Vector2D
Parameters
x
:
number
= 0
y
:
number
= 0
Returns
Vector2D
Properties
Private
_x
_x
:
number
Private
_y
_y
:
number
Accessors
x
get
x
(
)
:
number
Returns
number
y
get
y
(
)
:
number
Returns
number
Methods
add
add
(
value
)
:
Vector2D
Parameters
value
:
Point
|
Vector2D
Returns
Vector2D
addX
addX
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
addY
addY
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
added
added
(
value
)
:
Vector2D
Parameters
value
:
Point
|
Vector2D
Returns
Vector2D
addedX
addedX
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
addedY
addedY
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
angle
In
Degrees
angle
In
Degrees
(
)
:
number
Returns
number
angle
In
Radians
angle
In
Radians
(
)
:
number
Returns
number
clone
clone
(
)
:
Vector2D
Returns
Vector2D
direction
direction
(
)
:
number
Returns
number
div
div
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
divided
divided
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
dot
dot
(
value
)
:
number
Parameters
value
:
Point
|
Vector2D
Returns
number
fix
fix
(
fractionDigits
?
)
:
Vector2D
Parameters
Optional
fractionDigits
:
number
Returns
Vector2D
fixed
fixed
(
fractionDigits
?
)
:
Vector2D
Parameters
Optional
fractionDigits
:
number
Returns
Vector2D
from
Point
from
Point
(
point
)
:
Vector2D
Parameters
point
:
Point
Returns
Vector2D
getX
getX
(
)
:
number
Returns
number
getY
getY
(
)
:
number
Returns
number
is
Equal
is
Equal
(
value
)
:
boolean
Parameters
value
:
Point
|
Vector2D
Returns
boolean
log
log
(
)
:
void
Returns
void
magnitude
magnitude
(
)
:
number
Returns
number
mult
mult
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
normalize
normalize
(
)
:
Vector2D
Returns
Vector2D
normalized
normalized
(
)
:
Vector2D
Returns
Vector2D
round
round
(
)
:
Vector2D
Returns
Vector2D
rounded
rounded
(
)
:
Vector2D
Returns
Vector2D
scale
scale
(
scalar
)
:
Vector2D
Parameters
scalar
:
number
Returns
Vector2D
scaled
scaled
(
scalar
)
:
Vector2D
Parameters
scalar
:
number
Returns
Vector2D
set
set
(
x
,
y
)
:
Vector2D
Parameters
x
:
number
y
:
number
Returns
Vector2D
setX
setX
(
x
)
:
Vector2D
Parameters
x
:
number
Returns
Vector2D
setY
setY
(
y
)
:
Vector2D
Parameters
y
:
number
Returns
Vector2D
sub
sub
(
value
)
:
Vector2D
Parameters
value
:
Point
|
Vector2D
Returns
Vector2D
subX
subX
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
subY
subY
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
subtracted
subtracted
(
value
)
:
Vector2D
Parameters
value
:
Point
|
Vector2D
Returns
Vector2D
subtractedX
subtractedX
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
subtractedY
subtractedY
(
value
)
:
Vector2D
Parameters
value
:
number
Returns
Vector2D
to
Point
to
Point
(
)
:
Point
Returns
Point
to
String
to
String
(
fractionDigits
?
)
:
string
Parameters
Optional
fractionDigits
:
number
Returns
string
Static
from
Point
from
Point
(
point
)
:
Vector2D
Parameters
point
:
Point
Returns
Vector2D
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
_x
_y
x
y
add
addX
addY
added
addedX
addedY
angle
In
Degrees
angle
In
Radians
clone
direction
div
divided
dot
fix
fixed
from
Point
getX
getY
is
Equal
log
magnitude
mult
normalize
normalized
round
rounded
scale
scaled
set
setX
setY
sub
subX
subY
subtracted
subtractedX
subtractedY
to
Point
to
String
from
Point
@mauricioroberto/math-
world
Math
World
Paint
Vector2D
Arc
Draw
Capsule
Draw
Circle
Draw
Debug
Mouse
Mode
Line
Draw
Paint
Draw
Mode
Point
Point
Draw
Rect
Draw
Tailwind
Color
Name
Tailwind
Color
Value
Text
Draw
Generated using
TypeDoc