Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Math.round() to Pixel.correctLevel()
The old versions of setRed/Green/Blue cast doubles to ints whenever necessary. I thought the new versions would, but they actually didn't because they passed the values through Pixel.correctLevel(int). I assumed Jython would downcast the doubles to ints, but that was wrong. So, I added a Pixel.correctLevel(double) that rounds the value passed in before passing it to Pixel.correctLevel(int).
- Loading branch information