rounding to .5
rounding to .5
- Subject: rounding to .5
- From: Dev WO <email@hidden>
- Date: Tue, 5 Jul 2005 13:54:22 +0200
Hi,
I've been searching for a simple way to handle ratings in a WO app:
users can only affect integer (1 to 5), and I'd like to provide the
overall rating with .5 precision (1, 1.5, 2, ...).
I know I can make a method with if 1.25 < overallRating < 1.76 then
overallRating = 1.5, etc but I was wondering if there's any built-in
java method for rounding to .5.
I red the Math API and looked at the rounding modes, but it doesn't
look like what I need...
Is there something more "direct" to do the .5 rounding than the if...
method?
Thanks:)
Xavier
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden