Home

constant: round


  {
    "comment": "/**\r\n * Computes `number` rounded to `precision`.\r\n *\r\n * @since 3.10.0\r\n * @category Math\r\n * @param {number} number The number to round.\r\n * @param {number} [precision=0] The precision to round to.\r\n * @returns {number} Returns the rounded number.\r\n * @example\r\n *\r\n * round(4.006)\r\n * // => 4\r\n *\r\n * round(4.006, 2)\r\n * // => 4.01\r\n *\r\n * round(4060, -2)\r\n * // => 4100\r\n */",
    "meta": {
        "range": [
            442,
            470
        ],
        "filename": "round.js",
        "lineno": 22,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo",
        "code": {
            "id": "astnode100007913",
            "name": "round",
            "type": "CallExpression",
            "value": ""
        }
    },
    "description": "Computes `number` rounded to `precision`.",
    "since": "3.10.0",
    "tags": [
        {
            "originalTitle": "category",
            "title": "category",
            "text": "Math",
            "value": "Math"
        }
    ],
    "params": [
        {
            "type": {
                "names": [
                    "number"
                ]
            },
            "description": "The number to round.",
            "name": "number"
        },
        {
            "type": {
                "names": [
                    "number"
                ]
            },
            "optional": true,
            "defaultvalue": 0,
            "description": "The precision to round to.",
            "name": "precision"
        }
    ],
    "returns": [
        {
            "type": {
                "names": [
                    "number"
                ]
            },
            "description": "Returns the rounded number."
        }
    ],
    "examples": [
        "round(4.006)\r// => 4\r\rround(4.006, 2)\r// => 4.01\r\rround(4060, -2)\r// => 4100"
    ],
    "name": "round",
    "longname": "round",
    "kind": "constant",
    "scope": "global",
    "___id": "T000002R000726",
    "___s": true,
    "filepath": "round.js"
}