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

Method position

perro_source/api_modules/perro_input_api/src/state.rs:281–285  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

279 /// Return normalized viewport position where bottom-left is `(0, 0)`.
280 #[inline]
281 pub fn position(&self) -> Vector2 {
282 let x = (self.position_x / self.viewport_width).clamp(0.0, 1.0);
283 let y = 1.0 - (self.position_y / self.viewport_height).clamp(0.0, 1.0);
284 Vector2::new(x, y)
285 }
286
287 /// Return viewport size in pixels.
288 #[inline]

Callers 15

reveal_scene_keyFunction · 0.45
recent_node_rankFunction · 0.45
save_all_scenesFunction · 0.45
set_file_folder_expandedFunction · 0.45
cached_scene_doc_sharedFunction · 0.45
store_scene_doc_cacheFunction · 0.45
cached_scene_nodeFunction · 0.45
set_file_tree_listFunction · 0.45
set_dropdown_optionsFunction · 0.45

Calls 1

clampMethod · 0.45

Tested by 10

push_substituted_tokenFunction · 0.36
preview_node_refFunction · 0.36
find_header_endFunction · 0.36
passthrough_argsFunction · 0.36