Author: DavidCzech
Date: 2008-03-17 19:26:23 -0400 (Mon, 17 Mar 2008)
New Revision: 1155

Modified:
   trunk/pysoy/src/atoms/Vector.pxi
Log:
No Ticket: Some vector clean up

Modified: trunk/pysoy/src/atoms/Vector.pxi
===================================================================
--- trunk/pysoy/src/atoms/Vector.pxi    2008-03-17 23:10:51 UTC (rev 1154)
+++ trunk/pysoy/src/atoms/Vector.pxi    2008-03-17 23:26:23 UTC (rev 1155)
@@ -15,7 +15,7 @@
 #  You should have received a copy of the GNU General Public License
 #  along with this program; if not, see http://www.gnu.org/licenses
 #
-# $Id: Stub.pxi 898 2008-02-15 08:16:28Z ArcRiley $
+# $Id$
 
 cdef class Vector :
   ''' PySoy Vector
@@ -34,7 +34,6 @@
                self._position[1] + other[1],
                self._position[2] + other[2])
   def __mul__(self,other):
-    cdef float* _position
     if isinstance(other, Vector) :
       raise TypeError("Must multiply with an integer, use cross or dot with 
Vectors")
     if isinstance(other, int):
@@ -45,9 +44,9 @@
     
   def __getitem__(self, index) :
     if type(index) != int :
-      raise TypeError('Position index must be an int')
+      raise TypeError('Vector index must be an int')
     if index > 2 or index < 0 :
-      raise IndexError('Position index out of range')
+      raise IndexError('Vector index out of range')
     return self._position[index] 
   
   def __setitem__(self, index, value) :
@@ -58,20 +57,19 @@
     if index > 2 or index < 0 :
       raise IndexError('Vector index out of range')
     self._position[index]=value
+  
   property x :
     def __get__(self) :   
       return self._position[0]
     def __set__(self, value) :
       self._position[0] = value
 
-
   property y :
     def __get__(self) :   
       return self._position[1]
     def __set__(self, value) :
       self._position[1] = value
 
-
   property z :
     def __get__(self) :   
       return self._position[2]

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to