center

The center point of the rectangle.

Examples

# use bevy_math::{Rect, Vec2};
let r = Rect::new(0., 0., 5., 1.); // w=5 h=1
assert!(r.center().abs_diff_eq(Vec2::new(2.5, 0.5), 1e-5));

Arguments

  • _self : Rect - No Documentation 🚧

Returns

  • arg0 : Vec2 - No Documentation 🚧