10 inline float RealToFloat(Real r) {return r;}
11 inline Real Random(Real max=1, Real min=0)
13 return min + (max-min) * ((Real)(rand() % (int)1e6) / 1e6);
16 typedef unsigned ObjectID;
20 Real x; Real y; Real w; Real h;
21 Rect() = default; // Needed so we can fread/fwrite this struct
22 Rect(Real _x, Real _y, Real _w, Real _h) : x(_x), y(_y), w(_w), h(_h) {}
26 s << "{" << x << ", " << y << ", " << w << ", " << h << "}";
33 std::vector<Rect> bounds;