@wcardinal/wcardinal-ui 0.433.0 → 0.434.0

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.433.0
2
+ Winter Cardinal UI v0.434.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -7229,12 +7229,14 @@
7229
7229
  if (scale <= 0 || 1 <= scale) {
7230
7230
  return 1;
7231
7231
  }
7232
- var target = 1 / scale;
7233
- var result = 1;
7234
- while (result < target && result < Number.MAX_SAFE_INTEGER) {
7235
- result <<= 1;
7236
- }
7237
- return result;
7232
+ var s = 1 / scale;
7233
+ s = s | (s >> 1);
7234
+ s = s | (s >> 2);
7235
+ s = s | (s >> 4);
7236
+ s = s | (s >> 8);
7237
+ s = s | (s >> 16);
7238
+ s = s | (s >> 32);
7239
+ return s - (s >> 1);
7238
7240
  };
7239
7241
  var toGridSize = function (grid, width, height, scale) {
7240
7242
  var canvas = Math.max(width, height);