- Index
- »
- fan.haystack
- »
- Coord
Coord
@Js
@Serializable { simple=true }
const class Coord : Obj
Geographic coordinate as latitude and longitute in decimal degrees.
Decode from string formatted as "C(lat,lng)"
Construct from floating point decimal degrees
Default value is "C(0.0,0.0)"
Compute great-circle distance two coordinates using haversine forumula
Equality is based on lat/lng
Hash is based on lat/lng
Latitude in decimal degrees
Longtitude in decimal degrees
Represented as "C(lat,lng)"
const static Coord : defVal
Default value is "C(0.0,0.0)"
Float dist(Coord c2)
Compute great-circle distance two coordinates using haversine forumula.
virtual Bool equals(Obj? that)
Equality is based on lat/lng
static new fromStr(Str s, Bool checked := true)
Decode from string formatted as "C(lat,lng)"
virtual Int hash()
Hash is based on lat/lng
Float lat()
Latitude in decimal degrees
Float lng()
Longtitude in decimal degrees
new make(Float lat, Float lng)
Construct from floating point decimal degrees
virtual Str toStr()
Represented as "C(lat,lng)"