mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
test-picking.c: Use G_PI rather than M_PI
M_PI is not universally available...
This commit is contained in:
parent
2a86ecc4b9
commit
2a54db4557
@ -40,9 +40,9 @@ do_events (ClutterActor *stage)
|
||||
|
||||
for (i = 0; i < n_events; i++)
|
||||
{
|
||||
angle += (2.0 * M_PI) / (gdouble)n_actors;
|
||||
while (angle > M_PI * 2.0)
|
||||
angle -= M_PI * 2.0;
|
||||
angle += (2.0 * G_PI) / (gdouble)n_actors;
|
||||
while (angle > G_PI * 2.0)
|
||||
angle -= G_PI * 2.0;
|
||||
|
||||
/* If we synthesized events, they would be motion compressed;
|
||||
* calling get_actor_at_position() doesn't have that problem
|
||||
@ -96,7 +96,7 @@ main (int argc, char **argv)
|
||||
|
||||
for (i = n_actors - 1; i >= 0; i--)
|
||||
{
|
||||
angle = ((2.0 * M_PI) / (gdouble) n_actors) * i;
|
||||
angle = ((2.0 * G_PI) / (gdouble) n_actors) * i;
|
||||
|
||||
color.red = (1.0 - ABS ((MAX (0, MIN (n_actors/2.0 + 0, i))) /
|
||||
(gdouble)(n_actors/4.0) - 1.0)) * 255.0;
|
||||
|
Loading…
Reference in New Issue
Block a user