daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Fractal1D
  2. {
  3.     /* Construct a one-dimensional fractal height map
  4.      * with a given width.
  5.      *
  6.      * Parameters:
  7.      *      width - the width of the heigh map
  8.      */
  9.     public Fractal1D(int width)
  10.     {
  11.        
  12.     }
  13.    
  14.     /* Get the height map as a one-dimensional array.
  15.      * Thus get(x) == asArray()[x]. Note that this
  16.      * returns a reference to the array backing this
  17.      * height map, so changes to the returned array
  18.      * will change values of this height map.
  19.      *
  20.      * Returns:
  21.      *      the height map as a one-dimensional array
  22.      */
  23.     public float[] asArray()
  24.     {
  25.        
  26.     }
  27.    
  28.     /* Get the height of a point in this height map.
  29.      *
  30.      * Parameters:
  31.      *      x - the x-coordinate of the desired point
  32.      * Returns:
  33.      *      the height at the point x
  34.      * Throws:
  35.      *      IllegalArgumentException -
  36.      *          if x < 0 || x >= w where w is the width
  37.      *          of this map.
  38.      */
  39.     public float get(int x)
  40.     {
  41.        
  42.     }
  43. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top