Geometry classes are no longer frozen
This commit is contained in:
parent
dd8b0364e0
commit
e6327deeef
1 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ from dataclasses import dataclass
|
||||||
from typing import Iterator, Optional, overload, Tuple
|
from typing import Iterator, Optional, overload, Tuple
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass
|
||||||
class Point:
|
class Point:
|
||||||
'''A two-dimensional point, with coordinates in X and Y axes'''
|
'''A two-dimensional point, with coordinates in X and Y axes'''
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ class Point:
|
||||||
return f'(x:{self.x}, y:{self.y})'
|
return f'(x:{self.x}, y:{self.y})'
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass
|
||||||
class Vector:
|
class Vector:
|
||||||
'''A two-dimensional vector, representing change in position in X and Y axes'''
|
'''A two-dimensional vector, representing change in position in X and Y axes'''
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ class Direction:
|
||||||
yield Direction.NorthWest
|
yield Direction.NorthWest
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass
|
||||||
class Size:
|
class Size:
|
||||||
'''A two-dimensional size, representing size in X (width) and Y (height) axes'''
|
'''A two-dimensional size, representing size in X (width) and Y (height) axes'''
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ class Size:
|
||||||
return f'(w:{self.width}, h:{self.height})'
|
return f'(w:{self.width}, h:{self.height})'
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass
|
||||||
class Rect:
|
class Rect:
|
||||||
'''A two-dimensional rectangle, defined by an origin point and size'''
|
'''A two-dimensional rectangle, defined by an origin point and size'''
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue