 
                                
                    
                        Re: Looking For Special Random Number Generator
                        Posted by mazemaster on 
    Sat Jul 31st 2010 at 5:34pm
                     
                    
                 
                
            
            
                
    
            890 posts
        438 snarkmarks
        Registered: 
    Feb 12th 2002
                     
                
                        ok, so say that the function rand(1,10) generates a random number between 1 and 10, and rand(1,100) generates a random number between 1 and 100. Then you could write something like this (pseudo code):
function custom_random()
while true
....trial_x_coordinate = rand(1,100)    
....trial_y_coordinate = rand(1,10)
....if 10 * trial_y_coordinate < 100 - trial_x_coordinate
........break
end
return trial_x_coordinate
(Ignore the extra ...'s, the site won't indent it right without them)
                                    
             
        
            
            
                                     
                                
                    
                        Re: Looking For Special Random Number Generator
                        Posted by mazemaster on 
    Mon Aug 2nd 2010 at 1:27am
                     
                    
                 
                
            
            
                
    
            890 posts
        438 snarkmarks
        Registered: 
    Feb 12th 2002
                     
                
                        If this is still confusing let me know I will try to explain more.
                                    
             
        
            
            
                                     
                                
                    
                        Re: Looking For Special Random Number Generator
                        Posted by omegaslayer on 
    Mon Aug 2nd 2010 at 1:44am
                     
                    
                 
                
            
            
                
    
            2481 posts
        595 snarkmarks
        Registered: 
    Jan 16th 2004
                    Occupation: Sr. DevOPS Engineer
                            Location: Seattle, WA
             
                
                        Which language is this in? Java (yarr) has a random class that can do this stuff for you actually. Anything else your gonna have to use maze master's algorithm.
                                    
             
        
            
            
                                     
                                
                    
                        Re: Looking For Special Random Number Generator
                        Posted by omegaslayer on 
    Sat Aug 7th 2010 at 4:16am
                     
                    
                 
                
            
            
                
    
            2481 posts
        595 snarkmarks
        Registered: 
    Jan 16th 2004
                    Occupation: Sr. DevOPS Engineer
                            Location: Seattle, WA
             
                
                        You can do a lot on excel. If M$ did something right, it was excel.
                                    
             
        
            
            
                                     
                                
                    
                        Re: Looking For Special Random Number Generator
                        Posted by Orpheus on 
    Thu Apr 14th 2011 at 9:27pm
                     
                    
                 
                
            
            
                
    
                    
                             Orpheus
                            Orpheus
            
                        member
     
            13860 posts
        2024 snarkmarks
        Registered: 
    Aug 26th 2001
                    Occupation: Long Haul Trucking
                            Location: Long Oklahoma - USA
             
                
                        You think you could post that background screen? It would make a cool desktop.. Or maybe its secret material and I should shut up.. :P
                                            
                        
The best things in life, aren't things.