lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


 

I’d like to leave the standard Lua rand in place please. I’d like the authors to retain copyright for all of the material in the standard Lua distrib. It is very easy to replace rand with one of your own, whether Lua is embedded or a library. It also fits with the philosophy that Lua is ANSI C and it uses ANSI rand, regardless of how good it is.

 

My half a shekel… Nick

 

 

 

-----Original Message-----
From: Brian Weed [mailto:bw@imaginengine.com]
Sent: Thursday, February 26, 2004 3:48 PM
To: Lua list
Subject: RE: Replacing rand()

 

As long as you can over-ride Math.random() and Math.randomseed(), then I don't recommend changing the standard library functions for some new/better routine.

Unless you are trying to guarantee cross platform compatibility out of the box.

 

Brian.

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of RLake@oxfam.org.pe
Sent: Thursday, February 26, 2004 12:52 PM
To: Lua list
Subject: RE: Replacing rand()


> Isn't there a way to override a library function like Math.random() ?

function math.random() return "this is random behaviour" end