(window_aspect: f32)
| 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 | |
| 506 | pub fn viewport_stream_rect_ratio( |
| 507 | window_aspect: f32, |
| 508 | layout: EditorLayoutMetrics, |
no test coverage detected