simple-squiggle

A restricted subset of Squiggle
Log | Files | Refs | README

round.js (460B)


      1 export var roundDocs = {
      2   name: 'round',
      3   category: 'Arithmetic',
      4   syntax: ['round(x)', 'round(x, n)'],
      5   description: 'round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.',
      6   examples: ['round(3.2)', 'round(3.8)', 'round(-4.2)', 'round(-4.8)', 'round(pi, 3)', 'round(123.45678, 2)'],
      7   seealso: ['ceil', 'floor', 'fix']
      8 };