Math.random newbie question
My textbook states that Math.random will generate a random number between 0 and 1. Does this INCLUDE 0 and 1? I am getting a feeling from my results that it does.
Thank you for your time and responses,
Last edited by buymysoul; 07-15-2005 at 03:25 PM.
Reason: change title
Java's Math.random() method will generate random numbers "greater than or equal to 0.0 and less than 1.0" (per the API documentation).
Last edited by nspils; 07-15-2005 at 09:08 PM.
A pseudo-random number between 0.0 and 1.0
Hey thanks guys, I guess the anomolie I experienced had to do with something else.
Thanks a lot for your help.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL