class

Size

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

Size models the width and height of a shape.

constructors makeInt

Construct with w, h as integers

fromStr

Parse from comma or space separated string

make

Construct with w, h

fields w

Width

h

Height

defVal

Default instance is 0,0

methods toStr

Return "w h"

equals

Return if obj is same Size value

hash

Return hash of w and h

defVal const static Size : defVal

Default instance is 0,0.

equals virtual Bool equals(Obj? obj)

Return if obj is same Size 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.

h const Float : h

Height

hash virtual Int hash()

Return hash of w and h.

make new make(Float w, Float h)

Construct with w, h.

makeInt new makeInt(Int w, Int h)

Construct with w, h as integers.

toStr virtual Str toStr()

Return "w h"

w const Float : w

Width

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