PHP Classes

Decimal values

Recommend this page to a friend!

      PHP bans and trap  >  All threads  >  Decimal values  >  (Un) Subscribe thread alerts  
Subject:Decimal values
Summary:Using intval() vs round()
Author:johno dread
Date:2009-06-24 19:22:30
Update:2009-06-24 21:23:17

  1. Decimal values   Reply   Report abuse  
johno dread - 2009-06-24 19:22:30
Just a quick note. I wonder what motivated the choice to use intval() in your encode method as opposed to using round. It seem to me that roun() would return a more accurate roman value for all types of input. For example, intav(10.8)// returns 10
round(10.8)// returns 11

In the latter the roman value returned by encode() would be closer to the decimal equivalent.

  2. Re: Decimal values   Reply   Report abuse  
Lee J - 2009-06-24 21:23:17 - In reply to message 1 from johno dread
i never even thought to use it,

thanks for the pointer ill keep it in mind for further release's and updates