TICKIT_RECT_INTERSECT(3)
π TICKIT_RECT_INTERSECT π
okay bestie, gather round, because this one is from the Library Functions Manual, section 3, and it is so useful it's giving main character energy fr fr β¨
β¨ NAME β¨
tickit_rect_intersect β obtain the intersection of two rectangles
πΈ SYNOPSIS πΈ
#include <tickit.h>
bool tickit_rect_intersect(TickitRect *dst,
const TickitRect *a, const TickitRect *b);
Link with -ltickit.
π¦ DESCRIPTION π¦
so tickit_rect_intersect() looks at the two rectangles you handed it, a and b, and checks if they intersect. if they do?? it initialises the rectangle structure pointed at by dst to hold that intersection, and returns true π
. that's it, that's the whole vibe.
if the two rectangles do not intersect, it returns false and does not touch the structure given by dst. like, hands off, no notes, it stays exactly how you left it π.
now here's the lowkey iconic part: dst may be equal to either a or b, or it can be a completely distinct rectangle structure. doesn't matter. the two source rectangles are read before the result gets written, so you're safe either way π«Ά.
btw, if all you wanna do is test whether two rectangles intersect and you do not care about actually getting the intersection region back β use tickit_rect_intersects(3) instead. different function, different job, no cap β¨
π RETURN VALUE π
tickit_rect_intersect() returns true if the rectangles intersect, and false if they don't. periodt. π
π SEE ALSO π
tickit_rect_init_sized(3)tickit_rect_init_bounded(3)tickit_rect_intersects(3)tickit_rect_add(3)tickit_rect_subtract(3)tickit_rect(7)tickit(7)
and that's the whole page, bestie π this was TICKIT_RECT_INTERSECT(3) from the Library Functions Manual, section 3 β no version string, no date, just pure rectangle-intersection excellence. slay, go intersect something πβ¨π§
π¦ where this page comes from
- alpine 3.24: libtickit-doc 0.4.6-r0 Β· MIT
- debian bookworm: libtickit-dev 0.4.3-1 Β· MIT
- debian trixie: libtickit-dev 0.4.3-2 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- nixos 26.05: libtickit 0.4.5
- nixpkgs unstable: libtickit 0.4.6
- ubuntu jammy: libtickit-dev 0.4.1-1 Β· MIT
- ubuntu noble: libtickit-dev 0.4.3-1.1build1 Β· MIT
- ubuntu questing: libtickit-dev 0.4.3-2
- ubuntu resolute: libtickit-dev 0.4.3-2build1 Β· MIT
- ubuntu stonking: libtickit-dev 0.4.3-2build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms