- 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)"
Represented as "C(lat,lng)"
Longtitude in decimal degrees
Equality is based on lat/lng
Compute great-circle distance two coordinates using haversine forumula
Hash is based on lat/lng
Latitude in decimal degrees
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)
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)"