Skip to main content

Crate use_physics

Crate use_physics 

Source
Expand description

§use-physics

Feature-gated facade for the focused RustUse physics crates.

§Install

[dependencies]
use-physics = { version = "0.0.1", default-features = false, features = ["force", "energy"] }

§Foundation

use-physics re-exports focused f64-first physics helpers behind opt-in features. The facade stays thin and mirrors the boundaries of the concrete crates.

§Example

use use_physics::{force, kinetic_energy};

let applied_force = force(10.0, 2.0);
let energy = kinetic_energy(2.0, 3.0);

assert_eq!(applied_force, 20.0);
assert_eq!(energy, 9.0);

§When to use directly

Choose use-physics when you want one dependency and one import surface. Prefer the focused crates directly when you only need one physics domain.

§Scope

  • The facade stays close to the focused crate APIs.
  • Feature flags map directly to the focused crates in this workspace.
  • Units systems and symbolic algebra are out of scope.

§Status

use-physics is a pre-1.0 crate with a deliberately small facade over focused helpers. Facade for RustUse physics helpers.

Re-exports§

pub use use_density as density;
pub use use_energy as energy;
pub use use_force as force;
pub use use_motion as motion;
pub use use_power as power;
pub use use_pressure as pressure;
pub use use_thermodynamics as thermodynamics;

Modules§

prelude

Enums§

DensityError
MotionError
PowerError
PressureError
ThermodynamicsError

Constants§

IDEAL_GAS_CONSTANT
STANDARD_GRAVITY

Functions§

average_power
Computes average power from total work and elapsed duration.
average_speed
Computes average speed from traveled distance and elapsed duration.
celsius_to_kelvin
density_of
Computes density from mass and occupied volume.
displacement
distance
earth_weight
electrical_power
final_velocity
force
gauge_pressure
heat_energy
hydrostatic_pressure
ideal_gas_pressure
Computes ideal gas pressure from amount of substance, temperature, and volume.
impulse
kinetic_energy
mass_from_density
mechanical_power
potential_energy
pressure
Computes pressure from applied force and cross-sectional area.
volume
Computes occupied volume from mass and density.
weight
work