Skip to content

Commit 384b726

Browse files
Merge pull request #299 from gwbres/velocity
Introduce has_velocity_dynamics
2 parents 8310be5 + 68f470b commit 384b726

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

anise/src/math/cartesian.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,13 @@ impl CartesianState {
205205
me.apply_dv_km_s(dv_km_s);
206206
me
207207
}
208+
209+
/// Returns True if velocity (dynamics) are defined.
210+
/// Which may not be the case if [Self] was built with [Self::from_position]
211+
/// and you only intend to use partial rotations.
212+
pub fn has_velocity_dynamics(&self) -> bool {
213+
self.velocity_km_s.norm() > 0.0
214+
}
208215
}
209216

210217
// Methods shared with Python

0 commit comments

Comments
 (0)