Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


The Number.halfAdjust function () API allows you half adjust or round a numeric value to a number provided to the functionspecific number of decimal positions.

Parameters
  1. NumberNumeric value
  2. Number of decimals in result value

Return Value

Rounded value

...

Example
Code Block
languagejavascript
pjs.define("num", { type: 'packed decimal', length: 15, decimals: 5 });

num = 9.876;
num = Number.halfAjusthalfAdjust(num, 2);
 
return num;
//9.88

...