nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
geometry: make the attributes of points optional
[nit.git]
/
lib
/
geometry
/
points_and_lines.nit
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]
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`
end
# Abstract 3d point, strongly linked to its implementation `Point3d`
@@
-107,7
+107,7
@@
class Point3d[N: Numeric]
super IPoint3d[N]
super Point[N]
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
end
# Abstract 2D line segment between two ordered points