build 180210. light source angle calculation tweak

This commit is contained in:
tmj-fstate
2018-02-10 19:54:22 +01:00
parent 0c880f3d4e
commit 6d3ce4908f
4 changed files with 32 additions and 13 deletions

View File

@@ -118,10 +118,11 @@ void cMoon::move() {
if( m_observer.second >= 0 ) { localtime.wSecond = m_observer.second; }
double ut = localtime.wHour
+ localtime.wMinute / 60.0 // too low resolution, noticeable skips
+ localtime.wSecond / 3600.0; // good enough in normal circumstances
+ localtime.wMinute / 60.0; // too low resolution, noticeable skips
// NOTE: finer resolution disabled to reduce shadow crawl in current implementation
/*
+ localtime.wMilliseconds / 3600000.0; // for really smooth movement
+ localtime.wSecond / 3600.0 // good enough in normal circumstances
+ localtime.wMilliseconds / 3600000.0; // for really smooth movement
*/
double daynumber = 367 * localtime.wYear
- 7 * ( localtime.wYear + ( localtime.wMonth + 9 ) / 12 ) / 4