struct GSF::Box
- GSF::Box
- Struct
- Value
- Object
Defined in:
gsf/box.crConstructors
-
.new(width : Int32 = 1, height : Int32 = width)
if only one arg is used, width is used for both width and height, like a square size
Instance Method Summary
-
#collides?(x, y, other : Box, other_x, other_y)
with other Box
-
#collides?(x, y, circle : Circle, cx, cy)
with circle (radius, cx, cy)
-
#collides?(x, y, radius, cx, cy)
with circle (cx, cy, radius)
- #height : Int32
- #height=(height : Int32)
- #width : Int32
- #width=(width : Int32)
Constructor Detail
def self.new(width : Int32 = 1, height : Int32 = width)
#
if only one arg is used, width is used for both width and height, like a square size