public int Round(double value) { double decimalpoints = Math.Abs(value - Math.Floor(value)); if (decimalpoints > 0.5) return (int)Math.Round(value); else return (int)Math.Floor(value); }
public int myRound(double val) { return (int)Math.Floor(val + .49); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)