Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeight.java @ 6149:3c8147ba35a6
Bed height: Removed braindead index determination code.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 02 Jun 2013 02:43:00 +0200 |
parents | af13ceeba52a |
children |
comparison
equal
deleted
inserted
replaced
6148:b12ec9f240bc | 6149:3c8147ba35a6 |
---|---|
76 public TDoubleArrayList getStations() { | 76 public TDoubleArrayList getStations() { |
77 return this.station; | 77 return this.station; |
78 } | 78 } |
79 | 79 |
80 public double getHeight(double station) { | 80 public double getHeight(double station) { |
81 if (this.station.indexOf(station) >= 0) { | 81 int index = this.station.indexOf(station); |
82 return this.heights.get(this.station.indexOf(station)); | 82 return index >= 0 ? heights.getQuick(index) : Double.NaN; |
83 } | |
84 return Double.NaN; | |
85 } | 83 } |
86 | 84 |
87 | 85 |
88 public static void removeNaNs(TDoubleArrayList [] arrays) { | 86 public static void removeNaNs(TDoubleArrayList [] arrays) { |
89 | 87 |