Bladeren bron

Remove std.Math usage to keep exclusive hxd.Math usage.

borisrp 3 maanden geleden
bovenliggende
commit
843a34f558
3 gewijzigde bestanden met toevoegingen van 9 en 9 verwijderingen
  1. 6 6
      hide/view/GraphEditor.hx
  2. 2 2
      hrt/prefab/Curve.hx
  3. 1 1
      hrt/prefab/l3d/Trails.hx

+ 6 - 6
hide/view/GraphEditor.hx

@@ -718,8 +718,8 @@ class GraphEditor extends hide.comp.Component {
 
 				// Snap origin of move
 				if (snap) {
-					Box.tmpPoint.x = std.Math.round(Box.tmpPoint.x / Box.NODE_MARGIN) * Box.NODE_MARGIN;
-					Box.tmpPoint.y = std.Math.round(Box.tmpPoint.y / Box.NODE_MARGIN) * Box.NODE_MARGIN;
+					Box.tmpPoint.x = hxd.Math.round(Box.tmpPoint.x / Box.NODE_MARGIN) * Box.NODE_MARGIN;
+					Box.tmpPoint.y = hxd.Math.round(Box.tmpPoint.y / Box.NODE_MARGIN) * Box.NODE_MARGIN;
 				}
 
 				var newX = Box.tmpPoint.x + dx;
@@ -727,8 +727,8 @@ class GraphEditor extends hide.comp.Component {
 
 				// Snap movement
 				if (snap) {
-					newX = std.Math.round(newX / Box.NODE_MARGIN) * Box.NODE_MARGIN;
-					newY = std.Math.round(newY / Box.NODE_MARGIN) * Box.NODE_MARGIN;
+					newX = hxd.Math.round(newX / Box.NODE_MARGIN) * Box.NODE_MARGIN;
+					newY = hxd.Math.round(newY / Box.NODE_MARGIN) * Box.NODE_MARGIN;
 				}
 				moveBox(b, newX, newY);
 			}
@@ -1458,8 +1458,8 @@ class GraphEditor extends hide.comp.Component {
 			pt.x += lX(ide.mouseX);
 			pt.y += lY(ide.mouseY);
 			// if (snapToGrid == !e.altKey) {
-			// 	newX = std.Math.round(newX / Box.NODE_MARGIN) * Box.NODE_MARGIN;
-			// 	newY = std.Math.round(newY / Box.NODE_MARGIN) * Box.NODE_MARGIN;
+			// 	newX = hxd.Math.round(newX / Box.NODE_MARGIN) * Box.NODE_MARGIN;
+			// 	newY = hxd.Math.round(newY / Box.NODE_MARGIN) * Box.NODE_MARGIN;
 			// }
 			node.setPos(pt);
 			opBox(node, true, undoBuffer);

+ 2 - 2
hrt/prefab/Curve.hx

@@ -593,10 +593,10 @@ class Curve extends Prefab {
 							}
 							else {
 
-								if (std.Math.isNaN(r0)) {
+								if (hxd.Math.isNaN(r0)) {
 									r0 = 0.0;
 								}
-								if (std.Math.isNaN(r1)) {
+								if (hxd.Math.isNaN(r1)) {
 									r1 = 1.0;
 								}
 

+ 1 - 1
hrt/prefab/l3d/Trails.hx

@@ -126,7 +126,7 @@ class TrailObj extends h3d.scene.Mesh {
 	var colorShader : h3d.shader.VertexColorAlpha;
 
 	public function calcMaxTrailPoints() : Int {
-		return std.Math.ceil( prefab.lifetime * prefab.framerate ) + 2; // Segment count + head and tail
+		return hxd.Math.ceil( prefab.lifetime * prefab.framerate ) + 2; // Segment count + head and tail
 	}
 
 	function calcMaxVertexes() : Int {