@rkmodules/rules 0.0.89 → 0.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +72 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +72 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/Primitives/Math/ceil.d.ts +2 -0
- package/dist/lib/Primitives/Math/floor.d.ts +2 -0
- package/dist/lib/Primitives/Math/round.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1131,6 +1131,75 @@ var tanDeg = {
|
|
|
1131
1131
|
}); },
|
|
1132
1132
|
};
|
|
1133
1133
|
|
|
1134
|
+
var ceil = {
|
|
1135
|
+
name: "ceil",
|
|
1136
|
+
label: "Round up",
|
|
1137
|
+
description: "Round a number up to the nearest integer",
|
|
1138
|
+
inputs: {
|
|
1139
|
+
x: { type: "number", default: 0 },
|
|
1140
|
+
},
|
|
1141
|
+
outputs: {
|
|
1142
|
+
ceil: "number",
|
|
1143
|
+
},
|
|
1144
|
+
impl: function (inputs) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1145
|
+
return __generator(this, function (_a) {
|
|
1146
|
+
return [2 /*return*/, {
|
|
1147
|
+
ceil: mapTree(inputs.x, function (x) {
|
|
1148
|
+
if (x === undefined)
|
|
1149
|
+
return DISCARD;
|
|
1150
|
+
return Math.ceil(x);
|
|
1151
|
+
}),
|
|
1152
|
+
}];
|
|
1153
|
+
});
|
|
1154
|
+
}); },
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
var floor = {
|
|
1158
|
+
name: "floor",
|
|
1159
|
+
label: "Round down",
|
|
1160
|
+
description: "Round a number down to the nearest integer",
|
|
1161
|
+
inputs: {
|
|
1162
|
+
x: { type: "number", default: 0 },
|
|
1163
|
+
},
|
|
1164
|
+
outputs: {
|
|
1165
|
+
floor: "number",
|
|
1166
|
+
},
|
|
1167
|
+
impl: function (inputs) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1168
|
+
return __generator(this, function (_a) {
|
|
1169
|
+
return [2 /*return*/, {
|
|
1170
|
+
floor: mapTree(inputs.x, function (x) {
|
|
1171
|
+
if (x === undefined)
|
|
1172
|
+
return DISCARD;
|
|
1173
|
+
return Math.floor(x);
|
|
1174
|
+
}),
|
|
1175
|
+
}];
|
|
1176
|
+
});
|
|
1177
|
+
}); },
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
var round = {
|
|
1181
|
+
name: "round",
|
|
1182
|
+
label: "Round",
|
|
1183
|
+
description: "Round a number to the nearest integer",
|
|
1184
|
+
inputs: {
|
|
1185
|
+
x: { type: "number", default: 0 },
|
|
1186
|
+
},
|
|
1187
|
+
outputs: {
|
|
1188
|
+
round: "number",
|
|
1189
|
+
},
|
|
1190
|
+
impl: function (inputs) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1191
|
+
return __generator(this, function (_a) {
|
|
1192
|
+
return [2 /*return*/, {
|
|
1193
|
+
round: mapTree(inputs.x, function (x) {
|
|
1194
|
+
if (x === undefined)
|
|
1195
|
+
return DISCARD;
|
|
1196
|
+
return Math.round(x);
|
|
1197
|
+
}),
|
|
1198
|
+
}];
|
|
1199
|
+
});
|
|
1200
|
+
}); },
|
|
1201
|
+
};
|
|
1202
|
+
|
|
1134
1203
|
var _a$6;
|
|
1135
1204
|
var primitives$6 = (_a$6 = {},
|
|
1136
1205
|
_a$6[calc.name] = calc,
|
|
@@ -1147,6 +1216,9 @@ var primitives$6 = (_a$6 = {},
|
|
|
1147
1216
|
_a$6[tanDeg.name] = tanDeg,
|
|
1148
1217
|
_a$6[sqrt.name] = sqrt,
|
|
1149
1218
|
_a$6[pow.name] = pow,
|
|
1219
|
+
_a$6[round.name] = round,
|
|
1220
|
+
_a$6[ceil.name] = ceil,
|
|
1221
|
+
_a$6[floor.name] = floor,
|
|
1150
1222
|
_a$6);
|
|
1151
1223
|
|
|
1152
1224
|
var filterList = {
|