From b9e0f7494881ad7cdfbcbc16878ecc6ef717753f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 20 Sep 2019 19:15:31 +0200 Subject: Create `iced_core` and `iced_native` --- src/point.rs | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/point.rs (limited to 'src/point.rs') diff --git a/src/point.rs b/src/point.rs deleted file mode 100644 index 183998dd..00000000 --- a/src/point.rs +++ /dev/null @@ -1,31 +0,0 @@ -use crate::Vector; - -/// A 2D point. -#[derive(Debug, Clone, Copy, PartialEq)] -pub struct Point { - /// The X coordinate. - pub x: f32, - - /// The Y coordinate. - pub y: f32, -} - -impl Point { - /// Creates a new [`Point`] with the given coordinates. - /// - /// [`Point`]: struct.Point.html - pub fn new(x: f32, y: f32) -> Self { - Self { x, y } - } -} - -impl std::ops::Add for Point { - type Output = Self; - - fn add(self, vector: Vector) -> Self { - Self { - x: self.x + vector.x, - y: self.y + vector.y, - } - } -} -- cgit