コード例 #1
0
ファイル: vector.py プロジェクト: 31415us/trajectory
 def __le__(self, other):
     """Compare vector length, shorter vectors are "less than"
     longer vectors.
     """
     try:
         return self.length2 <= other.length2
     except AttributeError:
         return assert_unorderable(self, other)
コード例 #2
0
ファイル: vector.py プロジェクト: 31415us/trajectory
 def __ge__(self, other):
     """Compare vector length, longer vectors are "greater than"
     shorter vectors.
     """
     try:
         return self.length2 >= other.length2
     except AttributeError:
         return assert_unorderable(self, other)
コード例 #3
0
 def __le__(self, other):
     """Compare vector length, shorter vectors are "less than"
     longer vectors.
     """
     try:
         return self.length2 <= other.length2
     except AttributeError:
         return assert_unorderable(self, other)
コード例 #4
0
 def __ge__(self, other):
     """Compare vector length, longer vectors are "greater than"
     shorter vectors.
     """
     try:
         return self.length2 >= other.length2
     except AttributeError:
         return assert_unorderable(self, other)
コード例 #5
0
ファイル: transform.py プロジェクト: msarch/py
 def __gt__(self, other):
     return assert_unorderable(self, other)
コード例 #6
0
ファイル: transform.py プロジェクト: rbaehr/bitcamp
 def __gt__(self, other):
     return assert_unorderable(self, other)