Class Polar
Hierarchy
- Polar
Index
Constructors
Properties
Methods
- add
- add
In Place - add
In Place From Floats - add
To Ref - as
Array - clone
- copy
From - copy
From Floats - divide
- divide
In Place - divide
To Ref - get
Class Name - multiply
- multiply
In Place - multiply
To Ref - scale
- scale
In Place - scale
To Ref - set
- set
All - subtract
- subtract
From Floats - subtract
From Floats To Ref - subtract
In Place - subtract
To Ref - to
String - to
Vector2 - to
Vector2 To Ref - From
Array - From
Vector2 - From
Vector2 To Ref
Constructors
constructor
Creates a new Polar object
Parameters
radius: number
the radius of the vector
theta: number
the angle of the vector
Returns Polar
Properties
radiusSearch playground for radius
thetaSearch playground for theta
Methods
addSearch playground for add
add In PlaceSearch playground for addInPlace
add In Place From FloatsSearch playground for addInPlaceFromFloats
Adds the provided values to the current polar
Parameters
radius: number
the amount to add to the radius
theta: number
the amount to add to the theta
Returns Polar
the current polar
add To RefSearch playground for addToRef
as ArraySearch playground for asArray
Converts the current polar to an array
Returns number[]
cloneSearch playground for clone
Clones the current polar
Returns Polar
a clone of the current polar
copy FromSearch playground for copyFrom
copy From FloatsSearch playground for copyFromFloats
Copies the given values into the current polar
Parameters
radius: number
the radius to use
theta: number
the theta to use
Returns Polar
the current polar
divideSearch playground for divide
divide In PlaceSearch playground for divideInPlace
divide To RefSearch playground for divideToRef
get Class NameSearch playground for getClassName
Gets the class name
Returns string
the string "Polar"
multiplySearch playground for multiply
multiply In PlaceSearch playground for multiplyInPlace
multiply To RefSearch playground for multiplyToRef
scaleSearch playground for scale
Scales the current polar and returns a new polar with the scaled coordinates
Parameters
scale: number
defines the multiplication factor
Returns Polar
the scaled polar
scale In PlaceSearch playground for scaleInPlace
Scales the current polar
Parameters
scale: number
defines the multiplication factor
Returns Polar
the current polar
scale To RefSearch playground for scaleToRef
setSearch playground for set
Sets the values of the current polar
Parameters
radius: number
the new radius
theta: number
the new theta
Returns Polar
the current polar
set AllSearch playground for setAll
Sets the values of the current polar
Parameters
value: number
the new values
Returns Polar
the current polar
subtractSearch playground for subtract
subtract From FloatsSearch playground for subtractFromFloats
Subtracts the given floats from the current polar
Parameters
radius: number
the amount to subtract from the radius
theta: number
the amount to subtract from the theta
Returns Polar
the difference polar
subtract From Floats To RefSearch playground for subtractFromFloatsToRef
subtract In PlaceSearch playground for subtractInPlace
subtract To RefSearch playground for subtractToRef
to StringSearch playground for toString
Converts the current polar to a string
Returns string
the current polar as a string
to Vector2Search playground for toVector2
Gets the rectangular coordinates of the current Polar
Returns Vector2
the rectangular coordinates
to Vector2 To RefSearch playground for toVector2ToRef
Static From ArraySearch playground for FromArray
Converts an array of floats to a polar
Parameters
array: number[]
the array to convert
Returns Polar
the converted polar
Class used to store (r, theta) vector representation