Spherical

Spherical

new

A set of curvilinear 3-dimensional coordinates.

Parameters:
Name Type Argument Default Description
clock Number <optional>
0.0 The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
cone Number <optional>
0.0 The angular coordinate measured from the positive z-axis and toward the negative z-axis.
magnitude Number <optional>
1.0 The linear coordinate measured from the origin.
Source:

Methods

Creates a duplicate of this Spherical.

Parameters:
Name Type Argument Description
result Spherical <optional>
The object to store the result into, if undefined a new instance will be created.
Returns:
The modified result parameter or a new instance if result was undefined.

Returns true if this spherical is equal to the provided spherical, false otherwise.

Parameters:
Name Type Description
other Spherical The Spherical to be compared.
Returns:
true if this spherical is equal to the provided spherical, false otherwise.

Returns true if this spherical is within the provided epsilon of the provided spherical, false otherwise.

Parameters:
Name Type Description
other Spherical The Spherical to be compared.
epsilon Number The epsilon to compare against.
Returns:
true if this spherical is within the provided epsilon of the provided spherical, false otherwise.

Returns a string representing this instance in the format (clock, cone, magnitude).

Returns:
A string representing this instance.

<static>

Creates a duplicate of a Spherical.

Parameters:
Name Type Argument Description
spherical Spherical The spherical to clone.
result Spherical <optional>
The object to store the result into, if undefined a new instance will be created.
Returns:
The modified result parameter or a new instance if result was undefined. (Returns undefined if spherical is undefined)

<static>

Returns true if the first spherical is equal to the second spherical, false otherwise.

Parameters:
Name Type Description
left Spherical The first Spherical to be compared.
right Spherical The second Spherical to be compared.
Returns:
true if the first spherical is equal to the second spherical, false otherwise.

<static>

Returns true if the first spherical is within the provided epsilon of the second spherical, false otherwise.

Parameters:
Name Type Argument Default Description
left Spherical The first Spherical to be compared.
right Spherical The second Spherical to be compared.
epsilon Number <optional>
0.0 The epsilon to compare against.
Returns:
true if the first spherical is within the provided epsilon of the second spherical, false otherwise.

<static>

Converts the provided Cartesian3 into Spherical coordinates.

Parameters:
Name Type Argument Description
cartesian3 Cartesian3 The Cartesian3 to be converted to Spherical.
spherical Spherical <optional>
The object in which the result will be stored, if undefined a new instance will be created.
Returns:
The modified result parameter, or a new instance if one was not provided.

<static>

Computes the normalized version of the provided spherical.

Parameters:
Name Type Argument Description
spherical Spherical The spherical to be normalized.
result Spherical <optional>
The object to store the result into, if undefined a new instance will be created.
Returns:
The modified result parameter or a new instance if result was undefined.

<static>

Returns a string representing the provided instance in the format (clock, cone, magnitude).

Parameters:
Name Type Description
spherical Spherical The object to be converted.
Returns:
A string representing the provided instance.