mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
fixed some typos (#1392)
missing 'c' in eulidianLength and eulidian. Should be euclidianLength and euclidian.
This commit is contained in:
parent
8366782688
commit
86a2d5fd03
@ -37,7 +37,7 @@ class Vector(object):
|
|||||||
__str__() : toString method
|
__str__() : toString method
|
||||||
component(i : int): gets the i-th component (start by 0)
|
component(i : int): gets the i-th component (start by 0)
|
||||||
__len__() : gets the size of the vector (number of components)
|
__len__() : gets the size of the vector (number of components)
|
||||||
euclidLength() : returns the eulidean length of the vector.
|
euclidLength() : returns the euclidean length of the vector.
|
||||||
operator + : vector addition
|
operator + : vector addition
|
||||||
operator - : vector subtraction
|
operator - : vector subtraction
|
||||||
operator * : scalar multiplication and dot product
|
operator * : scalar multiplication and dot product
|
||||||
@ -88,9 +88,9 @@ class Vector(object):
|
|||||||
"""
|
"""
|
||||||
return len(self.__components)
|
return len(self.__components)
|
||||||
|
|
||||||
def eulidLength(self):
|
def euclidLength(self):
|
||||||
"""
|
"""
|
||||||
returns the eulidean length of the vector
|
returns the euclidean length of the vector
|
||||||
"""
|
"""
|
||||||
summe = 0
|
summe = 0
|
||||||
for c in self.__components:
|
for c in self.__components:
|
||||||
|
Loading…
Reference in New Issue
Block a user