type
Coord
@Js
@Serializable { simple=true }
const class Coord : Obj
Geographic coordinate as latitude and longitute in decimal degrees.
constructors
fromStr |
Decode from string formatted as "C(lat,lng)" |
---|---|
make |
Construct from floating point decimal degrees |
fields
defVal |
Default value is "C(0.0,0.0)" |
---|
methods
dist |
Compute great-circle distance two coordinates using haversine forumula. |
---|---|
equals |
Equality is based on lat/lng |
hash |
Hash is based on lat/lng |
lat |
Latitude in decimal degrees |
lng |
Longtitude in decimal degrees |
toStr |
Represented as "C(lat,lng)" |
Slot Details
defVal
const static Coord defVal := ...
Default value is "C(0.0,0.0)"
dist
equals
fromStr
hash
virtual override Int hash()
Hash is based on lat/lng
lat
Float lat()
Latitude in decimal degrees
lng
Float lng()
Longtitude in decimal degrees
make
toStr
virtual override Str toStr()
Represented as "C(lat,lng)"