Displaying 1 result from an estimated 1 matches for "__mul__".
Did you mean:
__del__
2009 Aug 26
0
[LLVMdev] [Stackless] [C++-sig] [Boost] Trouble optimizing Boost.Python integration for game development (it seems too slow)
...t;> > cdef class Vec3:
>> >
>> > cdef readonly double x, y, z
>> >
>> > def __cinit__(Vec3 self, double x, double y, double z):
>> > self.x, self.y, self.z = x, y, z
>> >
>> > # operator *
>> > def __mul__(Vec3 self, double arg):
>> > return Vec3(self.x*arg, self.y*arg, self.z*arg)
>> >
>> > # operator +=
>> > def __iadd__(Vec3 self, Vec3 arg):
>> > #if not isinstance(arg, Vec3):
>> > # return NotImplemented
>...