Math
:= []
Math module - small 2D helpers for examples and simple games.
Coordinates use the same screen-space convention as Draw: x grows to the right, y grows downward, and rectangles are top-left plus width/height.
zero : Vec2
Square root for game-scale F32 values. Roc's pinned builtins do not expose sqrt yet, so keep this pure Roc.
add : Vec2, Vec2 -> Vec2
sub : Vec2, Vec2 -> Vec2
length_squared : Vec2 -> F32
distance_squared : Vec2, Vec2 -> F32
normalize : Vec2 -> Vec2
center : Rect -> Vec2
closest_point : Rect, Vec2 -> Vec2
circle_contains : Circle, Vec2 -> Bool
circle_overlaps : Circle, Circle -> Bool
circle_rect : Circle, Rect -> Bool