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

il2fb.commons.Point3D   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%
Metric Value
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Point3D.__repr__() 0 2 1
A Point3D.__init__() 0 4 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