Skip to content

Commit 809729b

Browse files
committed
feat: use vector math 32 instead of 64
1 parent e6ceed6 commit 809729b

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

packages/forge2d/lib/src/collision/distance.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,6 @@ class DistanceProxy {
501501
_count = 2;
502502
radius = edge.radius;
503503
break;
504-
default:
505-
assert(false);
506504
}
507505
}
508506

packages/forge2d/lib/src/collision/time_of_impact.dart

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,7 @@ class SeparationFunction {
411411
_pointA.setFrom(Transform.mulVec2(_xfa, _localPointA));
412412

413413
return (_pointA..sub(_pointB)).dot(_normal);
414-
default:
415-
assert(false);
416-
indexes[0] = -1;
417-
indexes[1] = -1;
418-
return 0.0;
419-
}
414+
}
420415
}
421416

422417
double evaluate(int indexA, int indexB, double t) {
@@ -447,9 +442,6 @@ class SeparationFunction {
447442
_pointA.setFrom(Transform.mulVec2(_xfa, _localPointA));
448443

449444
return (_pointA..sub(_pointB)).dot(_normal);
450-
default:
451-
assert(false);
452-
return 0.0;
453-
}
445+
}
454446
}
455447
}

packages/forge2d/lib/src/dynamics/fixture.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,6 @@ class Fixture {
321321
}
322322
}
323323
break;
324-
default:
325-
break;
326-
}
324+
}
327325
}
328326
}

0 commit comments

Comments
 (0)