<commit_before>#![deny(missing_docs)]
#![feature(std_misc)]

//! Interpolation algorithms.
//!
//! Interpolation is used in animation,
//! to describe smooth shapes and to make transitions.
//! Any object that fullfill certain mathematical
//! properties can be interpolated.
//! A common technique is using one ore more 'numbers'
//! controlling the mixture of states.
//! The choice of interpolation algorithm depends often
//! on the circumstances where it used.

pub use ease::{
    Ease,
    EaseFunction,
};
pub use spatial::Spatial;

mod ease;
mod spatial;

/// Performs linear interpolation.
/// A linear interpolation consists of two states 'a' and 'b'.
/// The 't' variable is a factor between 0 and 1 that
/// gives weight to 'a' or 'b'.
/// When 't' is zero then 'a' has full weight.
/// When 't' is one then 'b' has full weight.
#[inline(always)]
pub fn lerp<T: Spatial>(a: &T, b: &T, t: &<T as Spatial>::Scalar) -> T {
    a.add(&b.sub(a).scale(t))<commit_msg>Fixed warnings.<commit_after>#![deny(missing_docs)]
#![feature(std_misc, core)]

//! Interpolation algorithms.
//!
//! Interpolation is used in animation,
//! to describe smooth shapes and to make transitions.
//! Any object that fullfill certain mathematical
//! properties can be interpolated.
//! A common technique is using one ore more 'numbers'
//! controlling the mixture of states.
//! The choice of interpolation algorithm depends often
//! on the circumstances where it used.

pub use ease::{
    Ease,
    EaseFunction,
};
pub use spatial::Spatial;

mod ease;
mod spatial;

/// Performs linear interpolation.
/// A linear interpolation consists of two states 'a' and 'b'.
/// The 't' variable is a factor between 0 and 1 that
/// gives weight to 'a' or 'b'.
/// When 't' is zero then 'a' has full weight.
/// When 't' is one then 'b' has full weight.
#[inline(always)]
pub fn lerp<T: Spatial>(a: &T, b: &T, t: &<T as Spatial>::Scalar) -> T {
    a.add(&b.sub(a).scale(t))
{'fraction_non_alphanumeric': 0.14519427402862986, 'fraction_numerical': 0.002044989775051125, 'mean_word_length': 3.5300925925925926, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1110037', 'n_tokens_mistral': 622, 'n_tokens_neox': 587, 'n_words': 257}