summaryrefslogtreecommitdiff
path: root/game_server/src/maths.rs
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2019-05-31 16:40:00 +0200
committerDennis Kobert <d-kobert@web.de>2019-05-31 16:40:00 +0200
commit4cdb0d88a065df2456b3e12389836eebc9b2fa4a (patch)
tree1633fdda3fbad79a48952e8dab50181f4c00ef3c /game_server/src/maths.rs
parent79db730d4e42ce592af753059422410979ff26b0 (diff)
Fix issues in Collide
Diffstat (limited to 'game_server/src/maths.rs')
-rw-r--r--game_server/src/maths.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/game_server/src/maths.rs b/game_server/src/maths.rs
index 8844c6e..a55c5ce 100644
--- a/game_server/src/maths.rs
+++ b/game_server/src/maths.rs
@@ -93,10 +93,10 @@ impl std::ops::Sub<Vec2> for Box {
pub struct RBox {
/// Point 1
- pub p1: Vec2,
+ pub pos: Vec2,
/// Point 2
- pub p2: Vec2,
- /// Width
+ pub size: Vec2,
+ /// Width Attention manhatten distance!!!
pub w: f32,
}
@@ -104,8 +104,8 @@ impl std::ops::Add<Vec2> for RBox {
type Output = Self;
fn add(self, other: Vec2) -> Self {
Self {
- p1: self.p1 + other,
- p2: self.p2 + other,
+ pos: self.p1 + other,
+ size: self.p2 + other,
w: self.w,
}
}
@@ -115,8 +115,8 @@ impl std::ops::Sub<Vec2> for RBox {
type Output = Self;
fn sub(self, other: Vec2) -> Self {
Self {
- p1: self.p1 + other,
- p2: self.p2 + other,
+ pos: self.p1 + other,
+ size: self.p2 + other,
w: self.w,
}
}