MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / floor

Method floor

lib.commonjs/utils/fixednumber.js:386–393  ·  view source on GitHub ↗

* Returns a new [[FixedNumber]] which is the largest **integer** * that is less than or equal to %%this%%. * * The decimal component of the result will always be ``0``.

()

Source from the content-addressed store, hash-verified

384 * The decimal component of the result will always be ``0``.
385 */
386 floor() {
387 let val = this.#val;
388 if (this.#val < BN_0) {
389 val -= this.#tens - BN_1;
390 }
391 val = (this.#val / this.#tens) * this.#tens;
392 return this.#checkValue(val, "floor");
393 }
394 /**
395 * Returns a new [[FixedNumber]] which is the smallest **integer**
396 * that is greater than or equal to %%this%%.

Callers 3

getDefaultProviderFunction · 0.45
shuffleFunction · 0.45
getMedianFunction · 0.45

Calls 1

#checkValueMethod · 0.95

Tested by

no test coverage detected