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

Method floor

lib.esm/utils/fixednumber.js:383–390  ·  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

381 * The decimal component of the result will always be ``0``.
382 */
383 floor() {
384 let val = this.#val;
385 if (this.#val < BN_0) {
386 val -= this.#tens - BN_1;
387 }
388 val = (this.#val / this.#tens) * this.#tens;
389 return this.#checkValue(val, "floor");
390 }
391 /**
392 * Returns a new [[FixedNumber]] which is the smallest **integer**
393 * 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