Class Table Of Contents

- All Classes
- All Files
- API
  - comb
    - logging
      - PropertyConfigurator
      - Level
      - BasicConfigurator
      - Logger
      - appenders
        - RollingFileAppender
        - ConsoleAppender
        - Appender
        - FileAppender
        - JSONAppender
    - PromiseList
    - Promise
    - regexp
    - array
    - string
    - collections
      - Pool
      - Iterable
      - HashTable
      - MaxHeap
      - Heap
      - Stack
      - AVLTree
      - AnderssonTree
      - Collection
      - RedBlackTree
      - Tree
      - Queue
      - BinaryTree
      - PriorityQueue
      - MinHeap
    - plugins
      - Middleware
      - Broadcaster
    - number
    - characters
    - date
- comb.number
- Methods
  - round

# Namespace comb.number

Utilities for numbers
Defined in: number.js.

Namespace Detail
comb.number

    /**
     * Rounds a number to the specified places.
         *
         *
         * @param {Number} num the number to round.
         * @param {Number} places the number of places to round to.
         */
    round : function(number, places, increment) {
        increment = increment || 1e-20;
        var factor = 10 / (10 * (increment || 10));
        return (Math.ceil(factor * +number) / factor).toFixed(places) * 1;
    }

Method Detail
<static> comb.number.round(num, places, increment)
Rounds a number to the specified places.

Parameters:
{Number} num
  the number to round.
{Number} places
  the number of places to round to.
increment

    increment = increment || 1e-20;
    var factor = 10 / (10 * (increment || 10));
    return (Math.ceil(factor * +number) / factor).toFixed(places) * 1;

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 31 2012 16:14:12 GMT-0600 (CST)