Admittedly, VBScript's built-in round function leaves a lot to be desired. Thanks to Anthony Sullivan and Mike Trinder for helping me to build the following function, which seems to work a lot better in all cases:
<% Function roundit(number,decPoints) decPoints = 10^decPoints roundit = round(number*decPoints+0.1)/decPoints End Function %> |