- Index
- »
- fan.graphics
- »
- Point
Point
@Js
@Serializable { simple=true }
const class Point : Obj
Point models a x,y coordinate.
Construct with x, y
Parse from comma or space separated string
Construct with x, y
X coordinate
Y coordinate
Default instance is 0,0
Return "x y"
Return if obj is same Point value
Return hash of x and 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)
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