mirror of
https://github.com/Ed94/VEFontCache-Odin.git
synced 2025-08-06 06:52:44 -07:00
added floor
not sure if needed yet, was used when refining positioning
This commit is contained in:
@@ -12,6 +12,16 @@ import "core:math"
|
|||||||
ceil_f64 :: math.ceil_f64
|
ceil_f64 :: math.ceil_f64
|
||||||
ceil_f64le :: math.ceil_f64le
|
ceil_f64le :: math.ceil_f64le
|
||||||
ceil_f64be :: math.ceil_f64be
|
ceil_f64be :: math.ceil_f64be
|
||||||
|
|
||||||
|
floor_f16 :: math.floor_f16
|
||||||
|
floor_f16le :: math.floor_f16le
|
||||||
|
floor_f16be :: math.floor_f16be
|
||||||
|
floor_f32 :: math.floor_f32
|
||||||
|
floor_f32le :: math.floor_f32le
|
||||||
|
floor_f32be :: math.floor_f32be
|
||||||
|
floor_f64 :: math.floor_f64
|
||||||
|
floor_f64le :: math.floor_f64le
|
||||||
|
floor_f64be :: math.floor_f64be
|
||||||
import "core:math/linalg"
|
import "core:math/linalg"
|
||||||
import "core:mem"
|
import "core:mem"
|
||||||
Kilobyte :: mem.Kilobyte
|
Kilobyte :: mem.Kilobyte
|
||||||
@@ -23,10 +33,6 @@ import "core:mem"
|
|||||||
Arena :: mem.Arena
|
Arena :: mem.Arena
|
||||||
arena_allocator :: mem.arena_allocator
|
arena_allocator :: mem.arena_allocator
|
||||||
arena_init :: mem.arena_init
|
arena_init :: mem.arena_init
|
||||||
// import "codebase:grime"
|
|
||||||
// log :: grime.log
|
|
||||||
// logf :: grime.logf
|
|
||||||
// profile :: grime.profile
|
|
||||||
|
|
||||||
//#region("Proc overload mappings")
|
//#region("Proc overload mappings")
|
||||||
|
|
||||||
@@ -54,6 +60,20 @@ clear :: proc {
|
|||||||
clear_dynamic_array,
|
clear_dynamic_array,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
floor :: proc {
|
||||||
|
math.floor_f16,
|
||||||
|
math.floor_f16le,
|
||||||
|
math.floor_f16be,
|
||||||
|
math.floor_f32,
|
||||||
|
math.floor_f32le,
|
||||||
|
math.floor_f32be,
|
||||||
|
math.floor_f64,
|
||||||
|
math.floor_f64le,
|
||||||
|
math.floor_f64be,
|
||||||
|
|
||||||
|
floor_vec2,
|
||||||
|
}
|
||||||
|
|
||||||
make :: proc {
|
make :: proc {
|
||||||
make_dynamic_array,
|
make_dynamic_array,
|
||||||
make_dynamic_array_len,
|
make_dynamic_array_len,
|
||||||
|
@@ -17,6 +17,7 @@ vec2_from_vec2i :: #force_inline proc "contextless" ( v2i : Vec2i ) -> Vec2
|
|||||||
vec2i_from_vec2 :: #force_inline proc "contextless" ( v2 : Vec2 ) -> Vec2i { return { i32(v2.x), i32(v2.y) }}
|
vec2i_from_vec2 :: #force_inline proc "contextless" ( v2 : Vec2 ) -> Vec2i { return { i32(v2.x), i32(v2.y) }}
|
||||||
|
|
||||||
@(require_results) ceil_vec2 :: proc "contextless" ( v : Vec2 ) -> Vec2 { return { ceil_f32(v.x), ceil_f32(v.y) } }
|
@(require_results) ceil_vec2 :: proc "contextless" ( v : Vec2 ) -> Vec2 { return { ceil_f32(v.x), ceil_f32(v.y) } }
|
||||||
|
@(require_results) floor_vec2 :: proc "contextless" ( v : Vec2 ) -> Vec2 { return { floor_f32(v.x), floor_f32(v.y) } }
|
||||||
|
|
||||||
// This buffer is used below excluisvely to prevent any allocator recusion when verbose logging from allocators.
|
// This buffer is used below excluisvely to prevent any allocator recusion when verbose logging from allocators.
|
||||||
// This means a single line is limited to 4k buffer
|
// This means a single line is limited to 4k buffer
|
||||||
|
Reference in New Issue
Block a user