- Timestamp:
- 2025-04-25T22:46:01+02:00 (16 hours ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/coor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/ILatLon.java
r18589 r19394 73 73 * @return <code>true</code> if the other point has almost the same lat/lon 74 74 * values, only differing by no more than 1 / {@link #MAX_SERVER_PRECISION MAX_SERVER_PRECISION}. 75 * @since 18464 (extracted from {@link LatLon})75 * @since 18464 76 76 */ 77 77 default boolean equalsEpsilon(ILatLon other) { … … 85 85 * @return <code>true</code> if the other point has almost the same lat/lon 86 86 * values, only differing by no more than 1 / precision. 87 * @since 18464 (extracted from {@link LatLon})87 * @since 18464 88 88 */ 89 89 default boolean equalsEpsilon(ILatLon other, double precision) { … … 97 97 * @param other the other point. 98 98 * @return distance in metres. 99 * @since 18494 (extracted from {@link LatLon})99 * @since 18494 100 100 */ 101 101 default double greatCircleDistance(ILatLon other) { … … 128 128 * @param other the "destination" position 129 129 * @return heading in radians in the range 0 <= hd < 2*PI 130 * @since 18494 (extracted from {@link LatLon}, added in 9796)130 * @since 18494 131 131 */ 132 132 default double bearing(ILatLon other) { -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r19321 r19394 170 170 171 171 /** 172 * Determines if the other point has almost the same lat/lon values.173 * @param other other lat/lon174 * @return <code>true</code> if the other point has almost the same lat/lon175 * values, only differing by no more than 1 / {@link #MAX_SERVER_PRECISION MAX_SERVER_PRECISION}.176 * @deprecated since 18464 (use {@link ILatLon#equalsEpsilon(ILatLon)} instead)177 */178 @Deprecated(since = "18464", forRemoval = true)179 public boolean equalsEpsilon(LatLon other) {180 return ILatLon.super.equalsEpsilon(other);181 }182 183 /**184 172 * Determines if this lat/lon is within the given bounding box. 185 173 * @param b bounding box … … 198 186 public boolean isIn(Area a) { 199 187 return a == null || a.contains(x, y); 200 }201 202 /**203 * Computes the distance between this lat/lon and another point on the earth.204 * Uses <a href="https://en.wikipedia.org/wiki/Haversine_formula">Haversine formula</a>.205 * @param other the other point.206 * @return distance in metres.207 * @deprecated since 18494 (use {@link ILatLon#greatCircleDistance(ILatLon)} instead)208 */209 @Deprecated(since = "18494", forRemoval = true)210 public double greatCircleDistance(LatLon other) {211 return ILatLon.super.greatCircleDistance(other);212 }213 214 /**215 * Returns bearing from this point to another.216 *217 * Angle starts from north and increases clockwise, PI/2 means east.218 *219 * Please note that reverse bearing (from other point to this point) should NOT be220 * calculated from return value of this method, because great circle path221 * between the two points have different bearings at each position.222 *223 * To get bearing from another point to this point call other.bearing(this)224 *225 * @param other the "destination" position226 * @return heading in radians in the range 0 <= hd < 2*PI227 * @since 9796228 * @deprecated since 18494 (use {@link ILatLon#bearing(ILatLon)} instead)229 */230 @Deprecated(since = "18494", forRemoval = true)231 public double bearing(LatLon other) {232 return ILatLon.super.bearing(other);233 188 } 234 189
Note:
See TracChangeset
for help on using the changeset viewer.