[longomatch] Add + and - operators for Point
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add + and - operators for Point
- Date: Mon, 7 Jul 2014 11:23:26 +0000 (UTC)
commit 5e7daf4a8572ac13a5a4c5818593bc305bb017ff
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue May 27 18:42:53 2014 +0200
Add + and - operators for Point
LongoMatch.Core/Store/Point.cs | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Core/Store/Point.cs b/LongoMatch.Core/Store/Point.cs
index 7871336..b7ad06f 100644
--- a/LongoMatch.Core/Store/Point.cs
+++ b/LongoMatch.Core/Store/Point.cs
@@ -79,5 +79,13 @@ namespace LongoMatch.Common
public static bool operator > (Point p1, Point p2) {
return p1.X > p2.X && p1.Y > p2.Y;
}
+
+ public static Point operator + (Point p1, Point p2) {
+ return new Point (p1.X + p2.X, p1.Y + p2.Y);
+ }
+
+ public static Point operator - (Point p1, Point p2) {
+ return new Point (p1.X - p2.X, p1.Y - p2.Y);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]