Class: DefPolarVector

algeobra~DefPolarVector(params)

Definition of a polar vector described by its polar coordinates. Will create a TYPE_VECTOR

Constructor

new DefPolarVector(params)

Default values
Parameters:
Name Type Description
params Object
Properties
Name Type Description
r Number The radius
alpha Number The angle
ref Object The reference point
Source:

Methods

compute(info) → {Object}

Creates the vector
Parameters:
Name Type Description
info CreateInfo The creation info
Source:
Returns:
Polar vector of type TYPE_VECTOR
Type
Object

(static) fromAngle(params) → {CreateInfo}

Creates a new vector from an angle measured from a starting angle. If no start angle is given, the one from the angle object is used
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
angle Number | Object Either the index or value of a TYPE_ANGLE. The angle
startAngle Number | Object <optional>
Either the index or value of a TYPE_NUMBER. The start angle
r Number | Object <optional>
Either the index or value of a TYPE_NUMBER. The radius
ref Number | Object <optional>
Either the index or value of a TYPE_POINT. The reference point
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromPolar(polar, refopt) → {CreateInfo}

Creates a new vector from polar coordinates.
Parameters:
Name Type Attributes Description
polar Number | Object Either the index or value of a TYPE_POLAR. The polar coordinates
ref Number | Object <optional>
Either the index or value of a TYPE_POINT. The reference point
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromRadiusAngle(params) → {CreateInfo}

Creates a new vector from an angle and a radius
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
r Number | Object <optional>
Either the index or value of a TYPE_NUMBER. The radius
alpha Number | Object <optional>
Either the index or value of a TYPE_NUMBER. The angle
ref Number | Object <optional>
Either the index or value of a TYPE_POINT. The reference point
Source:
Returns:
The creation info
Type
CreateInfo