Completed
Push — master ( a55149...0becad )
by Oleksandr
02:02
created

Point3D.__init__()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 4
cts 4
cp 1
rs 10
cc 1
crap 1
1
# -*- coding: utf-8 -*-
2
3 1
from .structures import BaseStructure
4
5
6 1
class Point2D(BaseStructure):
7 1
    __slots__ = ['x', 'y', ]
8
9 1
    def __init__(self, x, y):
10 1
        self.x = float(x)
11 1
        self.y = float(y)
12
13
    def __repr__(self):
14
        return "<Point2D '{0};{1}'>".format(self.x, self.y)
15
16
17 1
class Point3D(BaseStructure):
18 1
    __slots__ = ['x', 'y', 'z', ]
19
20 1
    def __init__(self, x, y, z):
21 1
        self.x = float(x)
22 1
        self.y = float(y)
23 1
        self.z = float(z)
24
25
    def __repr__(self):
26
        return "<Point3D '{0};{1};{2}'>".format(self.x, self.y, self.z)
27