<<
path:
root/public/0x2lib.git/html/tests/rectcut.jai
blob: 0d43001b89a5a440300e180fd5c6f25d561fd88a
[raw]
[clear marker]
11 t := rcut_from_right(*root, 0.5);
12 ass(t, Rectangle.{ 500.0, 0.0, 500.0, 1000.0 });
14 t = rcut_from_left(*root, 0.1);
15 ass(t, Rectangle.{ 0, 0, 50, 1000 });
17 t = rcut_from_top(*root, 0.8);
18 ass(t, Rectangle.{ 50, 0, 450, 800 });
20 t = rcut_from_bottom(*root, 0.34);
21 ass(t, Rectangle.{ 50, 932, 450, 68 });
31 x: float; /** top-left corner position x */
32 y: float; /** top-left corner position y */
38ass :: (a: Rectangle, b: Rectangle, loc := #caller_location) #expand {
42 ok &= a.width == b.width;
43 ok &= a.height == b.height;
44 if !ok then #insert,scope() ASS_CODE;
50#import,file "../0x2_Rectcut.jai";