#![warn(missing_docs)]
pub mod clock;
pub mod direction;
pub mod ease;
pub mod interpolate;
pub mod prelude;
pub mod repeat;
pub mod tween;
pub use clock::{AnimClock, ClockState};
pub use direction::PlaybackDirection;
pub use ease::Ease;
pub use interpolate::{lerp, Interpolate};
pub use repeat::{RepeatCount, RepeatStrategy};
pub use tween::Tween;
pub use easer::functions as easing;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_version() {
assert!(!VERSION.is_empty());
}
#[test]
fn test_easing_reexport() {
use easer::functions::Easing;
let v = easing::Quad::ease_in_out(0.5f32, 0.0, 100.0, 1.0);
assert!((v - 50.0).abs() < 1e-4);
}
#[test]
fn test_root_reexports() {
let mut tween = Tween::from_to(0.0f32, 10.0f32, std::time::Duration::from_secs(1))
.ease(Ease::QuadInOut);
let (val, state) = tween.step(std::time::Duration::from_millis(500));
assert!((val - 5.0).abs() < 1e-4);
assert_eq!(state, ClockState::Active);
}
}