mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-21 01:39:51 +00:00
LocationUtils: Add computeDistance() variant with Points.
This commit is contained in:
parent
e6474db222
commit
9c82857a67
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2010-2015 the original author or authors.
|
||||
* Copyright the original author or authors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -17,10 +17,16 @@
|
|||
|
||||
package de.schildbach.pte;
|
||||
|
||||
import de.schildbach.pte.dto.Point;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
*/
|
||||
public final class LocationUtils {
|
||||
public static float computeDistance(final Point p1, final Point p2) {
|
||||
return computeDistance(p1.getLatAsDouble(), p1.getLonAsDouble(), p2.getLatAsDouble(), p2.getLonAsDouble());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lat1
|
||||
* latitude of origin point in decimal degrees
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue