Module: utilsCircle

utilities which is used to calculate randomAngles for sphere.
Author:
License:
  • under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Source:

Members

(static, constant) angles

Adds a longitude property to the vertice angles array for the circle hypersphere.
Source:

Methods

(static) cartesianToPolar(coordinates) → {Object}

Converts Cartesian coordinates to polar coordinates, returning only the angle.
Parameters:
Name Type Description
coordinates Object The object containing Cartesian coordinates.
Properties
Name Type Description
x number The horizontal coordinate.
y number The vertical coordinate.
Source:
Returns:
An object containing the angular position 'longitude' in radians.
Type
Object

(static) polarToCartesian(value, r) → {Array.<number>}

Converts polar coordinates of a point on a circle to Cartesian coordinates.
Parameters:
Name Type Description
value Object The object containing the angular position.
Properties
Name Type Description
longitude number The angular position (theta) of the point in radians.
r number The radius of the circle.
Source:
Returns:
An array containing the Cartesian coordinates [x, y].
Type
Array.<number>