use-gravity
Gravity-specific helpers for RustUse.
Install
[]
= "0.0.1"
Foundation
use-gravity provides small f64-first helpers for gravitational force, gravitational acceleration, orbital velocity, escape velocity, orbital period, and gravitational potential energy.
Inputs are expected to be SI-style numeric values:
- kilograms for mass
- meters for distance, radius, and height
- seconds for time
- newtons for force
- joules for energy
Example
use ;
let earth = new.unwrap;
let force = gravitational_force.unwrap;
let escape = escape_velocity.unwrap;
assert_eq!;
assert!;
assert!;
When to use directly
Choose use-gravity when you only need reusable gravity and orbit formulas.
Scope
- APIs stay
f64-first and do not define a full unit system. - The crate keeps only a couple of convenience constants locally.
- Broader constants and units belong in the top-level
use-constantsanduse-unitssets.
Status
use-gravity is a pre-1.0 crate with a deliberately small API.