Mercurial > touhou
diff pytouhou/utils/random.pxd @ 509:292fea5c584e
Some more type optimisations.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 25 Nov 2013 19:12:56 +0100 |
parents | |
children |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/pytouhou/utils/random.pxd @@ -0,0 +1,10 @@ +cdef class Random: + cdef unsigned short seed + cdef unsigned long counter + + cdef void set_seed(self, unsigned short seed) nogil + cdef unsigned short rewind(self) nogil + + cpdef unsigned short rand_uint16(self) + cpdef unsigned int rand_uint32(self) + cpdef double rand_double(self)