time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

index.js (1393B)


      1 /**
      2 * @license Apache-2.0
      3 *
      4 * Copyright (c) 2018 The Stdlib Authors.
      5 *
      6 * Licensed under the Apache License, Version 2.0 (the "License");
      7 * you may not use this file except in compliance with the License.
      8 * You may obtain a copy of the License at
      9 *
     10 *    http://www.apache.org/licenses/LICENSE-2.0
     11 *
     12 * Unless required by applicable law or agreed to in writing, software
     13 * distributed under the License is distributed on an "AS IS" BASIS,
     14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15 * See the License for the specific language governing permissions and
     16 * limitations under the License.
     17 */
     18 
     19 'use strict';
     20 
     21 // TODO: implementation
     22 
     23 /**
     24 * Round a numeric value to the nearest integer.
     25 *
     26 * @module @stdlib/math/base/special/round
     27 *
     28 * @example
     29 * var round = require( '@stdlib/math/base/special/round' );
     30 *
     31 * var v = round( -4.2 );
     32 * // returns -4.0
     33 *
     34 * v = round( -4.5 );
     35 * // returns -4.0
     36 *
     37 * v = round( -4.6 );
     38 * // returns -5.0
     39 *
     40 * v = round( 9.99999 );
     41 * // returns 10.0
     42 *
     43 * v = round( 9.5 );
     44 * // returns 10.0
     45 *
     46 * v = round( 9.2 );
     47 * // returns 9.0
     48 *
     49 * v = round( 0.0 );
     50 * // returns 0.0
     51 *
     52 * v = round( -0.0 );
     53 * // returns -0.0
     54 *
     55 * v = round( Infinity );
     56 * // returns Infinity
     57 *
     58 * v = round( -Infinity );
     59 * // returns -Infinity
     60 *
     61 * v = round( NaN );
     62 * // returns NaN
     63 */
     64 
     65 // MODULES //
     66 
     67 var round = require( './round.js' );
     68 
     69 
     70 // EXPORTS //
     71 
     72 module.exports = round;