forked from DanielVartanov/ruby-geometry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
35 lines (28 loc) · 761 Bytes
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
== Auxiliary features
* Methods requests tagging
If algorithm requires some state or property of object, it should be tagged.
Requirements should be checked before each method call (of course, info should
be cached due to computational complexity of algorithms).
Example:
class Polygon
def convex?
...
end
def self_intersecting?
...
end
must_be :convex
must_not_be :self_intersecting
def contains_point?(point)
... # code, which assumes, that polygon is convex and not self_intersecting
end
== Algorithms
* Polygon convexity
* Polygons intersection
* Polygon contains given point?
* Rectangular bounds of polygon
* Area of polygon
* Does circle contain given point?
* Do circles intersect?
* Area of circle
* Making a ruby gem