[Date Prev][Date Next][Index][Thread] [SGT Mail Archive] [SGT Main Page]

Deep zoom or setRange fails for small values



*************************************************
Message from the sgt mail list.
*************************************************

Ok problem found,
sorry for the disturb in the mailing list.

For info:
The method  draw(Graphics g) in PlainAxis
contain a cast of int at line 107

  xt = (int)((uRange_.start/delta + (dir*uRange_.start > 0? 1.0: -1.0)*0.00001))*delta;

That should be a Math.floor e.g

xt = Math.floor((uRange_.start/delta + (dir*uRange_.start > 0? 1.0: -1.0)*0.00001))*delta;

because uRange_.start/delta could be greater then Integer.MAXIMUM_VALUE


Cheers
Andrea


*************************************************
To remove yourself from this mailing list,
send mail to <epic-majordomo@noaa.gov> with
"unsubscribe sgt" in the message body.
==========


Privacy Notice, External Links Disclaimer.