Trait primitives::prelude::Positionable
source · [−]pub trait Positionable {
fn x(&self) -> f32;
fn set_x(&self, val: f32);
fn y(&self) -> f32;
fn set_y(&self, val: f32);
fn set_position(&self, x: f32, y: f32);
}
Expand description
The Positionable should be implemented by objects intended to have 2D spatial position.
Required Methods
fn set_position(&self, x: f32, y: f32)
fn set_position(&self, x: f32, y: f32)
Sets both the horizontal and vertical position
Arguments
x
- The horizontal position.y
- The vertical position.