nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fefe84c
)
geometry: make the attributes of points optional
author
Alexis Laferrière
<alexis.laf@xymus.net>
Thu, 18 May 2017 19:52:26 +0000
(12:52 -0700)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Sun, 28 May 2017 19:45:16 +0000
(15:45 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/geometry/points_and_lines.nit
patch
|
blob
|
history
diff --git
a/lib/geometry/points_and_lines.nit
b/lib/geometry/points_and_lines.nit
index
3dc158a
..
eef5606
100644
(file)
--- a/
lib/geometry/points_and_lines.nit
+++ b/
lib/geometry/points_and_lines.nit
@@
-88,8
+88,8
@@
end
class Point[N: Numeric]
super IPoint[N]
- redef var x: N is writable
- redef var y: N is writable
+ redef var x: N = 0.0 is writable, optional
+ redef var y: N = 0.0 is writable, optional
end
# Abstract 3d point, strongly linked to its implementation `Point3d`
@@
-107,7
+107,7
@@
class Point3d[N: Numeric]
super IPoint3d[N]
super Point[N]
- redef var z: N is writable
+ redef var z: N = 0.0 is writable, optional
end
# Abstract 2D line segment between two ordered points