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