- Index
- »
- fan.graphics
- »
- Point
Point
@Js
@Serializable { simple=true }
const class Point : Obj
Point models a x,y coordinate.
Parse from comma or space separated string
Construct with x, y
Construct with x, y
Default instance is 0,0
X coordinate
Y coordinate
Return if obj is same Point value
Return hash of x and y
Return "x y"
Return x+tx, y+ty
const static Point : defVal
Default instance is 0,0.
virtual Bool equals(Obj? obj)
Return if obj is same Point value.
static new fromStr(Str s, Bool checked := true)
Parse from comma or space separated string. If invalid then throw ParseErr or return null based on checked flag.
virtual Int hash()
Return hash of x and y.
new make(Float x, Float y)
Construct with x, y.
new makeInt(Int x, Int y)
Construct with x, y.
virtual Str toStr()
Return "x y"
Point translate(Point t)
Return x+tx, y+ty
const Float : x
X coordinate
const Float : y
Y coordinate