projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.37.tar.gz
[xscreensaver]
/
hacks
/
fireworkx.c
diff --git
a/hacks/fireworkx.c
b/hacks/fireworkx.c
index db1c8d8168a658096cea796f3b7b18603f59de57..faf3745e23a160240ba3f391e85c20861ee86efe 100644
(file)
--- a/
hacks/fireworkx.c
+++ b/
hacks/fireworkx.c
@@
-143,8
+143,8
@@
static void render_light_map(struct state *st, fireshell *fs)
{
for (x = 0; x < st->width; x += 2, v += SHELLCOUNT)
{
{
for (x = 0; x < st->width; x += 2, v += SHELLCOUNT)
{
-
float
f;
- f = sqrt
f
((fs->cx - x) * (fs->cx - x) + (fs->cy - y) * (fs->cy - y)) + 4.0;
+
double
f;
+ f = sqrt((fs->cx - x) * (fs->cx - x) + (fs->cy - y) * (fs->cy - y)) + 4.0;
f = FLASH_ZOOM / f;
f += pow(f,0.1) * frand(0.0001); /* dither */
st->light_map[v] = f;
f = FLASH_ZOOM / f;
f += pow(f,0.1) * frand(0.0001); /* dither */
st->light_map[v] = f;