mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
Make love::Type handle type names
TODO: Fix undefined behaviour in luax_register_type, you can't use a va_list after a reference type --HG-- branch : dynamiccore2
This commit is contained in:
@@ -47,6 +47,8 @@ static uint64 wangHash64(uint64 key)
|
||||
return key;
|
||||
}
|
||||
|
||||
love::Type RandomGenerator::type("RandomGenerator", &Object::type);
|
||||
|
||||
// 64 bit Xorshift implementation taken from the end of Sec. 3 (page 4) in
|
||||
// George Marsaglia, "Xorshift RNGs", Journal of Statistical Software, Vol.8 (Issue 14), 2003
|
||||
// Use an 'Xorshift*' variant, as shown here: http://xorshift.di.unimi.it
|
||||
@@ -62,8 +64,6 @@ RandomGenerator::RandomGenerator()
|
||||
setSeed(newseed);
|
||||
}
|
||||
|
||||
love::Type RandomGenerator::type(&Object::type);
|
||||
|
||||
uint64 RandomGenerator::rand()
|
||||
{
|
||||
rng_state.b64 ^= (rng_state.b64 >> 12);
|
||||
|
||||
Reference in New Issue
Block a user