@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
 
@@ -7237,12 +7237,14 @@
7237
7237
  if (scale <= 0 || 1 <= scale) {
7238
7238
  return 1;
7239
7239
  }
7240
- var target = 1 / scale;
7241
- var result = 1;
7242
- while (result < target && result < Number.MAX_SAFE_INTEGER) {
7243
- result <<= 1;
7244
- }
7245
- return result;
7240
+ var s = 1 / scale;
7241
+ s = s | (s >> 1);
7242
+ s = s | (s >> 2);
7243
+ s = s | (s >> 4);
7244
+ s = s | (s >> 8);
7245
+ s = s | (s >> 16);
7246
+ s = s | (s >> 32);
7247
+ return s - (s >> 1);
7246
7248
  };
7247
7249
  var toGridSize = function (grid, width, height, scale) {
7248
7250
  var canvas = Math.max(width, height);