diff options
| author | Simon Rettberg | 2021-04-06 14:43:39 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2021-04-07 13:38:37 +0200 |
| commit | 38886de0c3e9ea5729ef23e4c653fa2822f52e8f (patch) | |
| tree | 9b799c8c968a92cc77746a95e0e8bdd90b6b13c3 /hacks/crystal.c | |
| parent | Maybe not remove, but ... (diff) | |
| download | xscreensaver-28r1.tar.gz xscreensaver-28r1.tar.xz xscreensaver-28r1.zip | |
Diffstat (limited to 'hacks/crystal.c')
| -rw-r--r-- | hacks/crystal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hacks/crystal.c b/hacks/crystal.c index 9f33529..e82492c 100644 --- a/hacks/crystal.c +++ b/hacks/crystal.c @@ -1142,8 +1142,9 @@ init_crystal(ModeInfo * mi) cryst->offset_h = (int) ((cryst->win_height - cryst->b * cos(( cryst->gamma - 90) * PI_RAD)) / 2.0); if (!centre) { + int n2 = (2 * cryst->offset_h); if (cryst->offset_h > 0) - cryst->offset_h = NRAND(2 * cryst->offset_h); + cryst->offset_h = NRAND(n2); cryst->offset_w = (int) (cryst->win_width - cryst->a - cryst->b * fabs(sin((cryst->gamma - 90) * PI_RAD))); |
