Package general.helperclasses

Source Code of general.helperclasses.RandomVectorGenerator

package general.helperclasses;

import general.datastructures.Vector2f;

import java.util.Random;


public abstract class RandomVectorGenerator {

  private static Random r = new Random();
 
  public static Vector2f getVector2f(float maxX, float maxY)
  {
    return new Vector2f(r.nextFloat()*maxX, r.nextFloat()*maxY);
  }

}
 
TOP

Related Classes of general.helperclasses.RandomVectorGenerator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.