-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rename spherical to nzSpherical to reflect its polarity.
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#pragma once | ||
|
||
// -z is spherical axis | ||
vec3 sphericalToCartesian( vec2 s ) { | ||
vec3 nzSphericalToCartesian( vec2 s ) { | ||
vec2 cs = cos( s ); | ||
vec2 ss = sin( s ); | ||
return vec3( cs.x * ss.y, cs.y, ss.x * ss.y ); | ||
} | ||
|
||
// -z is spherical axis | ||
vec2 cartesianToSpherical( vec3 dir ) { | ||
vec2 cartesianToNZSpherical( vec3 dir ) { | ||
return vec2( atan( dir.z, dir.x ), acos( dir.y ) ); | ||
} | ||
|