MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / SphericalToCartesian

Function SphericalToCartesian

SampleFramework12/v1.00/SF12_Math.h:669–676  ·  view source on GitHub ↗

Convert from spherical coordinates to Cartesian coordinates(x, y, z)

Source from the content-addressed store, hash-verified

667
668// Convert from spherical coordinates to Cartesian coordinates(x, y, z)
669inline Float3 SphericalToCartesian(float azimuth, float elevation)
670{
671 Float3 xyz;
672 xyz.x = std::cos(azimuth) * std::cos(elevation);
673 xyz.y = std::sin(elevation);
674 xyz.z = std::sin(azimuth) * std::cos(elevation);
675 return xyz;
676}
677
678inline Float2 CartesianToSpherical(const Float3& xyz)
679{

Callers 1

UpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected