MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getDaylight

Method getDaylight

src/Savegame/GameTime.cpp:260–263  ·  view source on GitHub ↗

* Returns the current position of the daylight emitted on the globe * according to the current ingame time, so the value is 0 when the light * starts at 0� longitude (6h) and 1 when the light ends at 0� longitude (18h). * @return Daylight position (0-1). */

Source from the content-addressed store, hash-verified

258 * @return Daylight position (0-1).
259 */
260double GameTime::getDaylight() const
261{
262 return (double)((((((_hour + 18) % 24) * 60) + _minute) * 60) + _second) / (60 * 60 * 24);
263}
264
265}

Callers 1

getSunDirectionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected