Type Definition olc_pixel_game_engine::Vf2d
source · pub type Vf2d = V2d<f32>;
Expand description
Mirror of olc::vf2d
. A 2D float vector type.
Implements std::ops::Add
, std::ops::Sub
, std::ops::Mul
, and std::ops::Div
as well as
all their assignment equivalents.
Example usage:
let mut a = Vf2d::new(10.0, 20.0) - Vf2d { x: 5.0, y: 5.0 };
a /= (5f32, 5f32).into();
assert_eq!(a, Vf2d::new(1.0, 3.0));