class

Point

@Js
@Serializable { simple=true }
const class Point : Obj

Point models a x,y coordinate.

constructors makeInt

Construct with x, y

fromStr

Parse from comma or space separated string

make

Construct with x, y

fields x

X coordinate

y

Y coordinate

defVal

Default instance is 0,0

methods toStr

Return "x y"

equals

Return if obj is same Point value

hash

Return hash of x and y

translate

Return x+tx, y+ty

defVal const static Point : defVal

Default instance is 0,0.

equals virtual Bool equals(Obj? obj)

Return if obj is same Point value.

fromStr 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.

hash virtual Int hash()

Return hash of x and y.

make new make(Float x, Float y)

Construct with x, y.

makeInt new makeInt(Int x, Int y)

Construct with x, y.

toStr virtual Str toStr()

Return "x y"

translate Point translate(Point t)

Return x+tx, y+ty

x const Float : x

X coordinate

y const Float : y

Y coordinate

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST