projects
/
monky
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changes to fix compilation under maemo5 - provided by Darren Long
[monky]
/
src
/
colours.c
diff --git
a/src/colours.c
b/src/colours.c
index
016eb32
..
f839f2f
100644
(file)
--- a/
src/colours.c
+++ b/
src/colours.c
@@
-10,7
+10,7
@@
* Please see COPYING for details
*
* Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
* Please see COPYING for details
*
* Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
- * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
+ * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
* (see AUTHORS)
* All rights reserved.
*
* (see AUTHORS)
* All rights reserved.
*
@@
-119,7
+119,7
@@
unsigned long *do_gradient(int width, unsigned long first_colour, unsigned long
for (i = 0; i < width; i++) {
int red3 = 0, green3 = 0, blue3 = 0; // colour components
for (i = 0; i < width; i++) {
int red3 = 0, green3 = 0, blue3 = 0; // colour components
- float factor = ((float)(i + 1) / width);
+ float factor = ((float) i / (width - 1));
/* the '+ 0.5' bit rounds our floats to ints properly */
if (red1 >= red2) {
/* the '+ 0.5' bit rounds our floats to ints properly */
if (red1 >= red2) {