Clear Up
SharpKit Reference

JsNumber.toPrecision Method (int)

Returns a JsString containing a number represented either in exponential or fixed-point notation with a specified number of digits.

Namespace: SharpKit.JavaScript

Class: JsNumber


public JsString toPrecision(int precision)


Type: System.Int32
Number of significant digits. Must be in the range 1 – 21, inclusive.

Return Value

Type: SharpKit.JavaScript.JsString
For numbers in exponential notation, precision - 1 digits are returned after the decimal point. For numbers in fixed notation, precision significant digits are returned.
© Copyright 2005-2011 SharpKit. All rights reserved.