comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Range.java @ 4334:048b3c3acd01

Range: Documentation.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 31 Oct 2012 13:46:04 +0100
parents 51f76225823b
children f7208c190e4a
comparison
equal deleted inserted replaced
4333:2d3f8af87b7b 4334:048b3c3acd01
1 package de.intevation.flys.artifacts.model; 1 package de.intevation.flys.artifacts.model;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
4 4
5 /** A range from ... to .*/
5 public class Range implements Serializable { 6 public class Range implements Serializable {
6 7
7 public static final double EPSILON = 1e-5; 8 public static final double EPSILON = 1e-5;
8 9
9 protected double start; 10 protected double start;
54 if (other.end < end ) end = other.end; 55 if (other.end < end ) end = other.end;
55 56
56 return true; 57 return true;
57 } 58 }
58 59
60 /** True if start>x<end (+ some epsilon) . */
59 public boolean inside(double x) { 61 public boolean inside(double x) {
60 return x > start-EPSILON && x < end+EPSILON; 62 return x > start-EPSILON && x < end+EPSILON;
61 } 63 }
62 } 64 }
63 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 65 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org