Use Math.round() instead of Math.ceil() to match AngularJS.