[][src]Trait yoyo_physics::threshold::Threshold

pub trait Threshold {
    type Value;
    type Velocity;
    pub fn evaluate(
        &mut self,
        approximation: &Approximation<Self::Value, Self::Velocity>
    ) -> bool; }

Implemented by types that can evaluate an approximation and determine if it is resting.

Associated Types

type Value[src]

The type of value that this threshold applies to.

type Velocity[src]

The type of velocity that this threshold applies to.

Loading content...

Required methods

pub fn evaluate(
    &mut self,
    approximation: &Approximation<Self::Value, Self::Velocity>
) -> bool
[src]

This function should evaluate the given approximate and return a boolean that indicates if the threshold for resting is met.

Loading content...

Implementors

impl<A, B> Threshold for And<A, B> where
    A: Threshold,
    B: Threshold<Value = A::Value, Velocity = A::Velocity>, 
[src]

type Value = A::Value

type Velocity = A::Velocity

impl<T> Threshold for DisplacementThreshold<T> where
    T: Float
[src]

type Value = T

type Velocity = T

impl<T> Threshold for VelocityThreshold<T> where
    T: Float
[src]

type Value = T

type Velocity = T

Loading content...