Size
structSize : struct {
width, height : i32
} Numeric constants and functions for trigonometry, rounding, clamping, and powers of two. Includes integer and floating-point points, sizes, and rectangles.
6 structs · 41 functions · Public API
Size : struct {
width, height : i32
} Point : struct {
x, y : i32
} Rect : struct {
size : Size
pos : Point
} SizeF : struct {
width, height : f32
} Float
PointF : struct {
x, y : f32
} RectF : struct {
size : SizeF
pos : PointF
} acos_f64 : func ( x : f64 ) -> f64 acosf_f32 : func ( x : f32 ) -> f32 sqrt_f64 : func ( x : f64 ) -> f64 sqrt_f32 : func ( x : f32 ) -> f32 sin_f64 : func ( x : f64 ) -> f64 sin_f32 : func ( x : f32 ) -> f32 cos_f64 : func ( x : f64 ) -> f64 cos_f32 : func ( x : f32 ) -> f32 tan_f64 : func ( x : f64 ) -> f64 floor_f64 : func ( x : f64 ) -> f64 floor_f32: func ( x : f32 ) -> f32 ceil_f64 : func ( x : f64 ) -> f64 ceil_f32 : func ( x : f32 ) -> f32 fabs : func ( x : f64 ) -> f64 fabs_f32 : func ( x : f32 ) -> f32 abs : func ( x : i32 ) -> i32 max : func<T>(a : T, b : T) -> T min : func<T>(a : T, b : T) -> T clamp : func<T>(value : T, low : T, high : T) -> T is_power_of_two : func(value : i64) -> bool next_power_of_two : func(value : i64) -> i64 get_top_left : func(rect : ^Rect) -> Point get_top_right : func(rect : ^Rect) -> Point get_bottom_left : func(rect : ^Rect) -> Point get_bottom_right : func(rect : ^Rect) -> Point get_center : func(rect : ^Rect) -> Point contains : func(rect: ^Rect, pt : Point) -> bool offset_by : func(rect : ^Rect, offset : Point) -> ^Rect inflate : func(rect : ^Rect, delta : Point) -> ^Rect intersect_rect : func(rect : ^Rect, other : ^Rect) -> Rect clamp_rect_to_rect : func(rect : Rect, bounds : Rect) -> Rect get_top_left : func(rect : ^RectF) -> PointF get_top_right : func(rect : ^RectF) -> PointF get_bottom_left : func(rect : ^RectF) -> PointF get_bottom_right : func(rect : ^RectF) -> PointF get_center : func(rect : ^RectF) -> PointF contains : func(rect : ^RectF, pt : PointF) -> bool offset_by : func(rect : ^RectF, offset : PointF) -> ^RectF inflate : func(rect : ^RectF, delta : PointF) -> ^RectF intersect_rect : func(rect : ^RectF, other : ^RectF) -> RectF clamp_rect_to_rect : func(rect : RectF, bounds : RectF) -> RectF