Clear Up
SharpKit Reference

JsMath.round Method (JsNumber)

Returns a supplied numeric expression rounded to the nearest integer.

Namespace: SharpKit.JavaScript

Class: JsMath

Syntax

public static JsNumber round(JsNumber number)

Parameters

number
Type: SharpKit.JavaScript.JsNumber
The value to be rounded to the nearest integer.

Return Value

Type: SharpKit.JavaScript.JsNumber
For positive numbers, if the decimal portion of number is 0.5 or greater, the return value is equal to the smallest integer greater than number. If the decimal portion is less than 0.5, the return value is the largest integer less than or equal to number. For negative numbers, if the decimal portion is exactly -0.5, the return value is the smallest integer that is greater than the number.
© Copyright 2005-2011 SharpKit. All rights reserved.