View Full Version : Random positions , and Mouse event

03-17-2011, 10:56 AM
Hello every one ,

I'm begginer in OpenGL ,,
rand() function
Whats the number should be after the % ..
should any one give me a small discription of it ,,
it's syntax ,, and should i use a single one for all objects or one for all ??

the mouse event whe i want to move the object to the mouse clicking position i know i should translete the mouse coordinate to the monitor coordinate how this will be done ?

thank u :)

03-17-2011, 11:05 AM
About rand() function: http://www.cplusplus.com/reference/clibrary/cstdlib/rand/

03-19-2011, 06:04 AM
Thanks McLeary that was helpful ,, but if I want to use it to generate random coordinate for an object which numbers i should range it in to keep it in the screen boundries