Add documentation

This commit is contained in:
SiboVG 2022-03-04 18:11:15 +01:00
parent e82a7a89b2
commit 3fcd942ee4

View File

@ -76,6 +76,11 @@ public class RigidBody {
MathUtil.equals(this.Izz, other.Izz)) ;
}
/**
* Rebase the current moment of inertia from this.cm reference system to newLocation reference system
* @param newLocation new moment of inertia reference system
* @return RigidBody with rebased moment of inertia
*/
public RigidBody rebase( final Coordinate newLocation ){
final Coordinate delta = this.cm.sub( newLocation ).setWeight(0.);
double x2 = pow2(delta.x);