Skip to main content

is_button_down

Function is_button_down 

Source
pub fn is_button_down(value: f64) -> bool
Expand description

Tests whether one raw button pressure counts as the button being down.

The threshold is one half so that a digital button reporting 1.0 and an analog trigger crossing its midpoint agree.

§Arguments

  • f64 - The raw button pressure as reported by the browser.

§Returns

  • bool - True when the pressure reaches the press threshold.