]>
Lady’s Gitweb - Sutra/blob - xsd/operators.js
1 // ♓️🪡 सूत्र ∷ xsd/operators.js
2 // ====================================================================
4 // Copyright © 2023 Lady [@ Lady’s Computer].
6 // This Source Code Form is subject to the terms of the Mozilla Public
7 // License, v. 2.0. If a copy of the MPL was not distributed with this
8 // file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
10 import { floor
} from "../deps.js";
13 * For the provided arguments m & n, the greatest integer less than or
16 * See <https://www.w3.org/TR/xmlschema11-2/#dt-div>.
18 export const div
= (m
, n
) => floor(m
/ n
);
21 * For the provided arguments m & n, m − n × (m ·div· n).
23 * See <https://www.w3.org/TR/xmlschema11-2/#dt-mod>.
25 * ☡ This function may suffer from floating‐point rounding errors if
26 * the provided arguments are not integers.
28 export const mod
= (m
, n
) => m
- n
* div(m
, n
);
This page took 0.089411 seconds and 5 git commands to generate.