validate_mass_props()
ensures that a mass properties list satisfies the following
constraints:
mass
is non-missing and positivecenter_mass
is a 3-vector of non-missing numeric valuespoint
is TRUE or FALSEif
point
is FALSE:inertia
is positive definiteeigenvalues \(\{\lambda_1, \lambda_2, \lambda_3\}\) of
inertia
satisfy the triangle inequalities:\(\lambda_1 < \lambda_2 + \lambda_3\)
\(\lambda_2 < \lambda_1 + \lambda_3\)
\(\lambda_3 < \lambda_1 + \lambda_2\)
Examples
mp <- get_mass_props(test_table, "C.1")
validate_mass_props(mp)
#> [1] TRUE