Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | 1 | from .structures import BaseStructure |
|
2 | |||
3 | |||
4 | 1 | class Point2D(BaseStructure): |
|
5 | 1 | __slots__ = ['x', 'y', ] |
|
6 | |||
7 | 1 | def __init__(self, x, y): |
|
8 | 1 | self.x = float(x) |
|
9 | 1 | self.y = float(y) |
|
10 | |||
11 | def __repr__(self): |
||
12 | return "<Point2D '{0};{1}'>".format(self.x, self.y) |
||
13 | |||
14 | |||
15 | 1 | class Point3D(BaseStructure): |
|
16 | 1 | __slots__ = ['x', 'y', 'z', ] |
|
17 | |||
18 | 1 | def __init__(self, x, y, z): |
|
19 | 1 | self.x = float(x) |
|
20 | 1 | self.y = float(y) |
|
21 | 1 | self.z = float(z) |
|
22 | |||
23 | def __repr__(self): |
||
24 | return "<Point3D '{0};{1};{2}'>".format(self.x, self.y, self.z) |
||
25 |