Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWKmsArtifact.java @ 8856:5e38e2924c07 3.2.x
Fix code style.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:12:01 +0100 |
parents | 04367906f158 |
children | 3f49835a00c3 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8855:d7c005e12af0 | 8856:5e38e2924c07 |
---|---|
329 return -1; | 329 return -1; |
330 } | 330 } |
331 | 331 |
332 // Do linear interpolation. | 332 // Do linear interpolation. |
333 int mod = kmIncreasing ? -1 : +1; | 333 int mod = kmIncreasing ? -1 : +1; |
334 return Linear.linear(km, wkms.getKm(idx+mod), wkms.getKm(idx), wkms.getW(idx+mod), wkms.getW(idx)); | 334 return Linear.linear( |
335 km, | |
336 wkms.getKm(idx+mod), | |
337 wkms.getKm(idx), | |
338 wkms.getW(idx+mod), | |
339 wkms.getW(idx) | |
340 ); | |
335 } | 341 } |
336 | 342 |
337 | 343 |
338 /** | 344 /** |
339 * Get the W at a specific km, only if it is closer to km than to any of | 345 * Get the W at a specific km, only if it is closer to km than to any of |
343 * @param wkms WKms in which to search for a spatially close W value. | 349 * @param wkms WKms in which to search for a spatially close W value. |
344 * @param km the input km, which is compared to values from wkms. | 350 * @param km the input km, which is compared to values from wkms. |
345 * @param next the next available input km (-1 if unavailable). | 351 * @param next the next available input km (-1 if unavailable). |
346 * @param prev the previous available input km (-1 if unavailable). | 352 * @param prev the previous available input km (-1 if unavailable). |
347 * | 353 * |
348 * @return W in wkms that is closer to km than to next and prev, or Double.NaN. | 354 * @return W in wkms that is closer to km than to next and prev, |
349 */ | 355 * or Double.NaN. |
350 public double getWAtCloseKm(WKms wkms, double km, double next, double prev) { | 356 */ |
357 public double getWAtCloseKm( | |
358 WKms wkms, | |
359 double km, | |
360 double next, | |
361 double prev | |
362 ) { | |
351 // TODO symbolic "-1" pr next/prev is a bad idea (tm), as we compare | 363 // TODO symbolic "-1" pr next/prev is a bad idea (tm), as we compare |
352 // distances to these values later. | 364 // distances to these values later. |
353 // TODO issue888 | 365 // TODO issue888 |
354 | 366 |
355 int size = wkms.size(); | 367 int size = wkms.size(); |