fromSpherical method
Sets the components of this 3D vector from a spherical coordinate.
Implementation
Vector3 fromSpherical(double radius, double phi, double theta ) {
final sinPhiRadius = math.sin( phi ) * radius;
x = sinPhiRadius * math.sin( theta );
y = math.cos( phi ) * radius;
z = sinPhiRadius * math.cos( theta );
return this;
}