mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
export ptick
This commit is contained in:
parent
889bf3448c
commit
22ce25c396
@ -29,7 +29,7 @@ purehookset hooks_frame, hooks_markers;
|
||||
ld animation_factor = 1;
|
||||
int animation_lcm = 0;
|
||||
|
||||
ld ptick(int period, ld phase = 0) {
|
||||
ld ptick(int period, ld phase) {
|
||||
if(animation_lcm) animation_lcm = animation_lcm * (period / gcd(animation_lcm, period));
|
||||
return (ticks * animation_factor) / period + phase * 2 * M_PI;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user