: Is there an easier way (or more efficent). This is more a curiosity than : anything else. Easy and efficient, as long as $archives_needed is always positive: $archives_needed = int($archives_needed + 0.5); Otherwise, if $archived_needed can be negative: $archives_needed = int($archives_needed + ($archived_needed < 0 ? -0.5 : 0.5)); Still more efficient than sprintf. -- tdk
- Quick rounding to nearest integer Craig Moynes/Markham/IBM
- Re: Quick rounding to nearest integer Kevin Meltzer
- Re: Quick rounding to nearest integer Jeff Pinyan
- Re: Quick rounding to nearest integer Jos Boumans
- RE: Quick rounding to nearest integer Timothy Kimball
- RE: Quick rounding to nearest integer Jeff Pinyan
- Re: Quick rounding to nearest integer Timothy Kimball