-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvelocity.py
More file actions
29 lines (24 loc) · 751 Bytes
/
velocity.py
File metadata and controls
29 lines (24 loc) · 751 Bytes
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
"""This file is for the Velocity class, keeping track of the change in coordinates."""
class Velocity:
"""A class that stores the rate of change for coordinates."""
def __init__(self):
"""Initalizes the change in x and y coordinates."""
self._dx = 0
self._dy = 0
# Getter and Setter properties are listed below
@property
def dx(self):
"""Returns dx value."""
return self._dx
@property
def dy(self):
"""Returns dy value."""
return self._dy
@dx.setter
def dx(self, dx):
"""Sets dx value."""
self._dx = dx
@dy.setter
def dy(self, dy):
"""Sets dy value."""
self._dy = dy