MCPcopy Create free account
hub / github.com/PerroEngine/Perro / test

Method test

perro_source/api_modules/perro_input_api/src/state.rs:105–110  ·  view source on GitHub ↗
(&self, bits: &[u64], key: KeyCode)

Source from the content-addressed store, hash-verified

103
104 #[inline]
105 fn test(&self, bits: &[u64], key: KeyCode) -> bool {
106 let idx = key.as_index();
107 let word = idx / 64;
108 let bit = 1_u64 << (idx % 64);
109 bits[word] & bit != 0
110 }
111}
112
113impl Default for KeyboardState {

Callers 3

is_key_downMethod · 0.45
is_key_pressedMethod · 0.45
is_key_releasedMethod · 0.45

Calls 1

as_indexMethod · 0.45

Tested by

no test coverage detected