Function tetra::time::get_blend_factor [−][src]
pub fn get_blend_factor(ctx: &Context) -> f32
Expand description
Returns a value between 0.0 and 1.0, representing how far between updates the game loop currently is.
For example, if the value is 0.01, an update just happened; if the value is 0.99, an update is about to happen.
This can be used to interpolate when rendering.
This function returns an f32
, which is usually what you want when blending - however,
if you need a more precise representation of the blend factor, you can call
get_blend_factor_precise
.