/** * subtract the two points to produce a vector * * @param other the offset to add to this point * @return a new point */ public final WorldDistance rangeFrom(final WorldLocation other, final WorldDistance res) { // check we have our model if (_model == null) { _model = new MWC.Algorithms.EarthModels.FlatEarth(); } // ok, how far apart are they? final WorldVector sep = _model.subtract(other, this); // update the results object res.setValues(sep.getRange(), WorldDistance.DEGS); // and return it. return res; }