title: breaking a mathematical range in equal parts
body: <p>I have a mathematical range [a, b] and I am trying to break the range into 'n' equal parts.
  The numbers, a and b can be anything but for an example let's assume the range is [0, 1]. </p>
  
  <p>Basically what I am trying to do is let's say that if <code>n = 4</code> and the range is <code>[0, 1]</code> then I want breakpoints for that range to be calculated as <code>[.25, .5, .75]</code> because these divide <code>[0, 1]</code> into 4 equal points. Similarly, if the range is <code>[0, 1]</code> and <code>n = 2</code>, I want the breakpoints to be [.5].</p>
  
  <p>What is the fastest way of computing these breakpoints in java? Is there a built-in function for doing this sort of thing? </p>