logo
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

The horizontal position.

Set horizontal position.

The vertical position.

Set vertical position.

Sets both the horizontal and vertical position

Arguments
  • x - The horizontal position.
  • y - The vertical position.

Implementors