use-distance 0.0.6

Small point-to-point distance helpers for RustUse geometry
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented1 out of 4 items with examples
  • Size
  • Source code size: 4.63 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 251.94 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-geometry
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-distance

Point-to-point distance and midpoint helpers for the RustUse geometry workspace.

Example

use use_distance::{distance_2d, midpoint_2d};
use use_point::Point2;

let left = Point2::new(0.0, 0.0);
let right = Point2::new(3.0, 4.0);

assert_eq!(distance_2d(left, right), 5.0);
assert_eq!(midpoint_2d(left, right), Point2::new(1.5, 2.0));