/ LJCJSCodeDoc / LJCCommonLib / LJC / Round


Parameters
value - A supplied value.
placeValue - The number of decimal place values.

Returns

The rounded value.

Syntax

JavaScript
static Round(value, placeValue)

Rounds and truncates to the provided place value.

Example

JavaScript
// Rounds and truncates to the provided place value.
Round()
{
  const value = 3.14159;
  const placeValue = 2;
  const result = LJC.Round(value, placeValue);

  // result:
  // 3.14;
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.