• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
rounding to .5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: rounding to .5
      • From: Christian Brunschen <email@hidden>
  • Prev by Date: Re: WO Builder Icons vs. Menues
  • Next by Date: Re: rounding to .5
  • Previous by thread: Re: Develop through Webserver problem
  • Next by thread: Re: rounding to .5
  • Index(es):
    • Date
    • Thread