MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / UpdateHorizontalCoords

Function UpdateHorizontalCoords

BakingLab/AppSettings.h:515–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513 }
514
515 inline void UpdateHorizontalCoords()
516 {
517 Float3 sunDir = SunDirection.Value();
518 SunElevation.SetValue(RadToDeg(asin(sunDir.y)));
519
520 float rad = atan2(sunDir.z, sunDir.x);
521 if(rad < 0.0f)
522 rad = 2.0f * Pi + rad;
523
524 float deg = RadToDeg(rad);
525 SunAzimuth.SetValue(deg);
526 }
527
528 inline void UpdateUnitVector()
529 {

Callers 2

InitializeMethod · 0.85
UpdateUIFunction · 0.85

Calls 5

RadToDegFunction · 0.85
asinFunction · 0.85
atan2Function · 0.85
ValueMethod · 0.80
SetValueMethod · 0.45

Tested by

no test coverage detected