Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: lib/src/dynamics/joints/gear_joint.dart

Issue 1138063003: pkg/box2d: 0.2.0 release (Closed) Base URL: https://github.com/google/dbox2d.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/dynamics/joints/friction_joint.dart ('k') | lib/src/dynamics/joints/mouse_joint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/dynamics/joints/gear_joint.dart
diff --git a/lib/src/dynamics/joints/gear_joint.dart b/lib/src/dynamics/joints/gear_joint.dart
index f895403b0b40a44dd817908fbe03e6c23e786dbe..d966692d435ca768d5c512a1156b2af7c8af54c2 100644
--- a/lib/src/dynamics/joints/gear_joint.dart
+++ b/lib/src/dynamics/joints/gear_joint.dart
@@ -56,7 +56,6 @@ part of box2d;
*/
class GearJoint extends Joint {
-
final Joint _joint1;
final Joint _joint2;
@@ -306,9 +305,8 @@ class GearJoint extends Joint {
_JvBD.setFrom(u).scale(_ratio);
_JwD = _ratio * rD.cross(u);
_JwB = _ratio * rB.cross(u);
- _mass += _ratio * _ratio * (_mD + _mB) +
- _iD * _JwD * _JwD +
- _iB * _JwB * _JwB;
+ _mass +=
+ _ratio * _ratio * (_mD + _mB) + _iD * _JwD * _JwD + _iB * _JwB * _JwB;
pool.pushVec2(3);
}
@@ -474,9 +472,7 @@ class GearJoint extends Joint {
JvBD.setFrom(u).scale(_ratio);
JwD = rD.cross(u);
JwB = rB.cross(u);
- mass += _ratio * _ratio * (_mD + _mB) +
- _iD * JwD * JwD +
- _iB * JwB * JwB;
+ mass += _ratio * _ratio * (_mD + _mB) + _iD * JwD * JwD + _iB * JwB * JwB;
pD.setFrom(_localAnchorD).sub(_lcD);
Rot.mulTransUnsafeVec2(qD, temp.setFrom(rB).add(cB).sub(cD), pB);
« no previous file with comments | « lib/src/dynamics/joints/friction_joint.dart ('k') | lib/src/dynamics/joints/mouse_joint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698