[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
I have optimised hsv_to_rgb() by reducing the equasion used to calculate the
colour-values. This saves 3 multiplies, 3 to 4 adds/subtracts and reduces by
one the number of temporary variables needed. The code is at this URL:
http://www.xs4all.nl/~ellman/ae-a/tmp/hsv2rgb.zip
In the code there are comments showing how I arrived at the reduced
expression. There are ways to optimise the code even further but they either
break the existing API or reduce the accuracy of the output.
AE.