litecanvas 0.103.6 → 0.103.7

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/dist.dev.js CHANGED
@@ -115,7 +115,7 @@
115
115
  var assert = (condition, message = "Assertion failed") => {
116
116
  if (!condition) throw new Error("[litecanvas] " + message);
117
117
  };
118
- var version = "0.103.6";
118
+ var version = "0.103.7";
119
119
  function litecanvas(settings = {}) {
120
120
  const root = window,
121
121
  math = Math,
@@ -229,7 +229,7 @@
229
229
  loggerPrefix + "clamp() 3rd param must be a number",
230
230
  );
231
231
  DEV: assert(
232
- max > min,
232
+ max >= min,
233
233
  loggerPrefix +
234
234
  "clamp() the 2nd param must be less than the 3rd param",
235
235
  );
@@ -335,7 +335,7 @@
335
335
  loggerPrefix + "rand() 2nd param must be a number",
336
336
  );
337
337
  DEV: assert(
338
- max > min,
338
+ max >= min,
339
339
  loggerPrefix + "rand() the 1st param must be less than the 2nd param",
340
340
  );
341
341
  const a = 1664525;
@@ -354,7 +354,7 @@
354
354
  loggerPrefix + "randi() 2nd param must be a number",
355
355
  );
356
356
  DEV: assert(
357
- min <= max,
357
+ max >= min,
358
358
  loggerPrefix +
359
359
  "randi() the 1st param must be less than the 2nd param",
360
360
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "litecanvas",
3
- "version": "0.103.6",
3
+ "version": "0.103.7",
4
4
  "description": "Lightweight HTML5 canvas 2D game engine suitable for small projects and creative coding. Inspired by PICO-8 and p5.js/Processing.",
5
5
  "license": "MIT",
6
6
  "author": "Luiz Bills <luizbills@pm.me>",
@@ -36,7 +36,7 @@
36
36
  "@size-limit/preset-small-lib": "^12.0.1",
37
37
  "@swc/core": "^1.15.18",
38
38
  "ava": "^7.0.0",
39
- "esbuild": "^0.27.3",
39
+ "esbuild": "^0.27.4",
40
40
  "genversion": "^3.2.0",
41
41
  "gzip-size": "^7.0.0",
42
42
  "prettier": "^3.8.1",
package/src/index.js CHANGED
@@ -210,7 +210,7 @@ export default function litecanvas(settings = {}) {
210
210
  DEV: assert(isNumber(min), loggerPrefix + 'clamp() 2nd param must be a number')
211
211
  DEV: assert(isNumber(max), loggerPrefix + 'clamp() 3rd param must be a number')
212
212
  DEV: assert(
213
- max > min,
213
+ max >= min,
214
214
  loggerPrefix + 'clamp() the 2nd param must be less than the 3rd param'
215
215
  )
216
216
 
@@ -319,7 +319,7 @@ export default function litecanvas(settings = {}) {
319
319
  DEV: assert(isNumber(min), loggerPrefix + 'rand() 1st param must be a number')
320
320
  DEV: assert(isNumber(max), loggerPrefix + 'rand() 2nd param must be a number')
321
321
  DEV: assert(
322
- max > min,
322
+ max >= min,
323
323
  loggerPrefix + 'rand() the 1st param must be less than the 2nd param'
324
324
  )
325
325
 
@@ -343,7 +343,7 @@ export default function litecanvas(settings = {}) {
343
343
  DEV: assert(isNumber(min), loggerPrefix + 'randi() 1st param must be a number')
344
344
  DEV: assert(isNumber(max), loggerPrefix + 'randi() 2nd param must be a number')
345
345
  DEV: assert(
346
- min <= max,
346
+ max >= min,
347
347
  loggerPrefix + 'randi() the 1st param must be less than the 2nd param'
348
348
  )
349
349
 
package/src/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '0.103.6'
2
+ export const version = '0.103.7'