@urso/core 0.7.56 → 0.7.58
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/build/js/index.js +1 -1
- package/package.json +1 -1
- package/src/js/lib/helper.js +7 -3
package/package.json
CHANGED
package/src/js/lib/helper.js
CHANGED
|
@@ -521,7 +521,11 @@ class LibHelper {
|
|
|
521
521
|
const b = this.getLengthBy2Points(point2, point3);
|
|
522
522
|
|
|
523
523
|
if (a !== 0 && b !== 0) {
|
|
524
|
-
const cornerRcos = (
|
|
524
|
+
const cornerRcos = Urso.math.intMakeBetween(
|
|
525
|
+
(a * a + b * b - c * c) / (2 * a * b),
|
|
526
|
+
-1, 1
|
|
527
|
+
);
|
|
528
|
+
|
|
525
529
|
angle = Math.acos(cornerRcos);
|
|
526
530
|
}
|
|
527
531
|
|
|
@@ -606,7 +610,7 @@ class LibHelper {
|
|
|
606
610
|
* @returns { Object }
|
|
607
611
|
*/
|
|
608
612
|
getRGB(color) {
|
|
609
|
-
return
|
|
613
|
+
return {
|
|
610
614
|
alpha: 16777215 < color ? color >>> 24 : 255,
|
|
611
615
|
red: color >> 16 & 255,
|
|
612
616
|
green: color >> 8 & 255,
|
|
@@ -634,7 +638,7 @@ class LibHelper {
|
|
|
634
638
|
* @returns { Number }
|
|
635
639
|
*/
|
|
636
640
|
interpolateColor32(startColor, targetColor, step) {
|
|
637
|
-
if(startColor === targetColor)
|
|
641
|
+
if (startColor === targetColor)
|
|
638
642
|
return startColor;
|
|
639
643
|
|
|
640
644
|
const startColorRGB = this.getRGB(startColor);
|