so I wrote up small example.java and a testRand.java subclass. Guess what? It works perfect! so something in my big starscape program messed it up, not the random function itself.
Since I crated...
Type: Posts; User: Spidey1980
so I wrote up small example.java and a testRand.java subclass. Guess what? It works perfect! so something in my big starscape program messed it up, not the random function itself.
Since I crated...
Here it is then.....
look for this line in folowing code:
{//resetStar method<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<here, look at next four lines
Star.java
//...
lol i'm so far past that anyways. Moving the randoms to the main and calling a set works well. And sorry, it output "NaN" since I'm working with doubles, not Null.
when I had the random in the setMethod, I had a println right after it.
pseudo - code:
public class Test()
{
public void test()
{
numberX = random() * 100
Just wondering, why does Math.random() (or any random technique) not work in a constructor or setMethod? It just outputs Null. However Math.sqrt(), ect. does work inside the method.
Once I moved...