If t_a is not a floating point value, then calculations such as (255 - t_a) / 255 are done as integers too. You need to cast one of your inputs to a float beforehand, e.g ((255 - t_a) / 255f).
Hannesh
2010-10-04 19:36:55