All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sim.util.DoubleDimension2D Maven / Gradle / Ivy

Go to download

MASON is a fast discrete-event multiagent simulation library core in Java, designed to be the foundation for large custom-purpose Java simulations, and also to provide more than enough functionality for many lightweight simulation needs. MASON contains both a model library and an optional suite of visualization tools in 2D and 3D.

The newest version!
/*
  Copyright 2006 by Sean Luke and George Mason University
  Licensed under the Academic Free License version 3.0
  See the file "LICENSE" for more information
*/

package sim.util;
import java.awt.geom.Dimension2D;

/** 
    One real oddity of Java 1.3.1 and 1.4.1 is the lack of
    a concrete subclass of Dimension2D which uses doubles or floats;
    the only one provided (java.awt.Dimension) uses ints!  This is particularly
    weird given that Java has Rectangle2D.Double, Rectangle2D.Float, and Rectangle (int),
    plus Point2D.Double, Point2D.Float, and Point (int), etc.  Inexplicable.
    
    

This class is a simple concrete subclass of Dimension2D with public width and height members. You're welcome. */ public class DoubleDimension2D extends Dimension2D { public double width; public double height; public DoubleDimension2D(double width, double height) { this.width = width; this.height = height; } public double getHeight() { return height; } public double getWidth() { return width; } public void setSize(double width, double height) { this.width = width; this.height = height; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy