optima 0.0.4

An easy to set up and easy optimization and planning toolbox, particularly for robotics.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use bevy::math::Vec2;
use bevy::prelude::Res;
use bevy::window::Windows;

pub struct WindowUtils;
impl WindowUtils {
    pub fn util_get_primary_window_size(windows: &Res<Windows>) -> Vec2 {
        let window = windows.get_primary().unwrap();
        let size = Vec2::new(window.width() as f32, window.height() as f32);
        size
    }
}