c2.js
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Arc
Cell
Cell
Vertex
Circle
Convex
Hull
Delaunay
Limited
Voronoi
Line
Point
Polygon
Polyline
Quad
Tree
Rect
Sector
Spline
Triangle
Vector
constructor
x
y
add
angle
copy
cross
distance
distance
Sq
div
dot
invert
limit
mag
mag
Sq
mult
normalize
perpendicular
projection
reflect
rotate
sub
Voronoi
Hierarchy
Vector
Index
Constructors
constructor
Properties
x
y
Methods
add
angle
copy
cross
distance
distance
Sq
div
dot
invert
limit
mag
mag
Sq
mult
normalize
perpendicular
projection
reflect
rotate
sub
Constructors
constructor
new
Vector
(
)
:
Vector
new
Vector
(
v
:
Vector
)
:
Vector
new
Vector
(
x
:
number
, y
:
number
)
:
Vector
Returns
Vector
Parameters
v:
Vector
Returns
Vector
Parameters
x:
number
y:
number
Returns
Vector
Properties
x
x
:
number
y
y
:
number
Methods
add
add
(
v
:
Vector
)
:
Vector
add
(
x
:
number
, y
:
number
)
:
Vector
Parameters
v:
Vector
Returns
Vector
Parameters
x:
number
y:
number
Returns
Vector
angle
angle
(
)
:
any
angle
(
v
:
Vector
)
:
number
Returns
any
Parameters
v:
Vector
Returns
number
copy
copy
(
)
:
Vector
Returns
Vector
cross
cross
(
v
:
Vector
)
:
number
Parameters
v:
Vector
Returns
number
distance
distance
(
v
:
Vector
)
:
number
Parameters
v:
Vector
Returns
number
distance
Sq
distance
Sq
(
v
:
Vector
)
:
number
Parameters
v:
Vector
Returns
number
div
div
(
n
:
number
)
:
Vector
Parameters
n:
number
Returns
Vector
dot
dot
(
v
:
Vector
)
:
number
Parameters
v:
Vector
Returns
number
invert
invert
(
)
:
Vector
Returns
Vector
limit
limit
(
n
:
number
)
:
Vector
Parameters
n:
number
Returns
Vector
mag
mag
(
)
:
number
Returns
number
mag
Sq
mag
Sq
(
)
:
number
Returns
number
mult
mult
(
n
:
number
)
:
Vector
Parameters
n:
number
Returns
Vector
normalize
normalize
(
)
:
Vector
Returns
Vector
perpendicular
perpendicular
(
)
:
Vector
Returns
Vector
projection
projection
(
v
:
Vector
)
:
Vector
Parameters
v:
Vector
Returns
Vector
reflect
reflect
(
v
:
Vector
)
:
Vector
Parameters
v:
Vector
Returns
Vector
rotate
rotate
(
a
:
any
)
:
Vector
Parameters
a:
any
Returns
Vector
sub
sub
(
v
:
Vector
)
:
Vector
sub
(
x
:
number
, y
:
number
)
:
Vector
Parameters
v:
Vector
Returns
Vector
Parameters
x:
number
y:
number
Returns
Vector