Skip to main content

spherical_to_cartesian

Function spherical_to_cartesian 

Source
pub fn spherical_to_cartesian(r: Real, theta: Real, phi: Real) -> Vec3
Expand description

Convert spherical coordinates (r, theta, phi) to Cartesian (x, y, z).

  • r – radial distance
  • theta – polar angle from +Z
  • phi – azimuthal angle from +X in XY plane