Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pip install vectors
## Usage
There are multiple ways to create our vector instances using the vectors module.

We can first initialize some vectors and points calling their repsective class
contructors as follows.
We can first initialize some vectors and points calling their respective class
constructors as follows.

```Python
from vectors import Point, Vector
Expand Down Expand Up @@ -58,7 +58,7 @@ We can also get access to the vector array to use it with other libraries.
v1.vector #=> [1, 2, 3]
```

We can also create our Vectors from a maginitude and up to two directions theta and phi.
We can also create our Vectors from a magnitude and up to two directions theta and phi.

```Python
v1 = Vector.from_mag_and_dir(1, math.pi) #=> Vector(-1,0,0)
Expand Down
6 changes: 3 additions & 3 deletions vectors/vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class Point(object):
"""Point class: Reprepsents a point in the x, y, z space."""
"""Point class: Represents a point in the x, y, z space."""
def __init__(self, x, y, z=0):
self.x = x
self.y = y
Expand Down Expand Up @@ -81,7 +81,7 @@ class Vector(Point):
"""

def __init__(self, x, y, z):
'''Vectors are created in rectangular coordniates
'''Vectors are created in rectangular coordinates

to create a vector in spherical or cylindrical
see the class methods
Expand Down Expand Up @@ -247,7 +247,7 @@ def spherical(cls, mag, theta, phi=0):

@classmethod
def cylindrical(cls, mag, theta, z=0):
'''Returns a Vector instance from cylindircal coordinates'''
'''Returns a Vector instance from cylindrical coordinates'''
return cls(
mag * math.cos(theta), # X
mag * math.sin(theta), # Y
Expand Down