use-frame-rate 0.0.1

Primitive frame-rate helpers
Documentation
  • Coverage
  • 7.69%
    1 out of 13 items documented1 out of 11 items with examples
  • Size
  • Source code size: 5.56 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 387.91 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 21s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-media
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

Primitive frame-rate helpers.

These helpers keep frame duration and frame-count calculations explicit.

Examples

use use_frame_rate::{FrameRate, frame_count, is_standard_frame_rate};

let rate = FrameRate::new(24.0).unwrap();

assert!((rate.frame_duration_seconds() - (1.0 / 24.0)).abs() < 1.0e-12);
assert_eq!(frame_count(2.5, 24.0).unwrap(), 60);
assert!(is_standard_frame_rate(23.976));