> Closest number (round):
> <cfset round25 = 25000 * int(0.5 + num/25000)>

You can just use round for this, instead of adding an then using int:

<cfset round25 = 25000 * round(num / 25000) />

cheers,
barneyb

On 4/6/06, One User <[EMAIL PROTECTED]> wrote:
> Closest number, which is SMALLER than a given "num" (round down):
> <cfset down25 = 25000 * int(num/25000)>
>
> Closest number, which is LARGER than a given "num" (round up):
> <cfset up25 = 25000 * ceiling(num/25000)>
>
> Closest number (round):
> <cfset round25 = 25000 * int(0.5 + num/25000)>
>


--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237117
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to