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

Function stream_half_ndc

perro_editor/res/scripts/scene/editor_viewport.rs:496–505  ·  view source on GitHub ↗
(window_aspect: f32)

Source from the content-addressed store, hash-verified

494 if half_w <= 0.0 || half_h <= 0.0 {
495 return None;
496 }
497 if ndc.x.abs() > half_w || ndc.y.abs() > half_h {
498 return None;
499 }
500 ndc.x /= half_w;
501 ndc.y /= half_h;
502
503 Some(ViewportPointer { uv, ndc })
504}
505
506pub fn viewport_stream_rect_ratio(
507 window_aspect: f32,
508 layout: EditorLayoutMetrics,

Callers 1

viewport_pointerFunction · 0.85

Calls 1

Tested by

no test coverage detected