Skip to content

GeoLocation

LielVaknin edited this page Dec 20, 2020 · 4 revisions

This class included in the api package and implements the geo_location interface.
It represents a geo location <x,y,z>, aka Point3D.

Fields in this class:

  • double x
  • double y
  • double z

GeoLocation methods:

  • Constructors -
  1. Constructor: GeoLocation(double x, double y, double z).
  2. Constructor: GeoLocation(double x, double y). - Gets a String, splits it and initializes x, y and z.
  3. Copy constructor: GeoLocation(String pos). - Performs a deep copy of a given geo location.
  • double x() - Returns x.
  • double y() - Returns y.
  • double z() - Returns z.
  • double distance(geo_location g) - Calculates the distance between this geo location and a given one.
Clone this wiki locally