Math

#load "std/math.bl"

std.PI

PI :: 

File: math.bl

std.TWO_PI

TWO_PI :: 

File: math.bl

std.HALF_PI

HALF_PI :: 

File: math.bl

std.F32_PI

F32_PI :: 

File: math.bl

std.F32_TWO_PI

F32_TWO_PI :: 

File: math.bl

std.F32_HALF_PI

F32_HALF_PI :: 

File: math.bl

std.F32_EPSILON

F32_EPSILON :: 

File: math.bl

std.F64_EPSILON

F64_EPSILON :: 

File: math.bl

std.S8_MIN

S8_MIN : s8 : 

File: math.bl

std.S8_MAX

S8_MAX : s8 : 127

File: math.bl

std.S16_MIN

S16_MIN : s16 : 

File: math.bl

std.S16_MAX

S16_MAX : s16 : 32767

File: math.bl

std.S32_MIN

S32_MIN : s32 : 

File: math.bl

std.S32_MAX

S32_MAX : s32 : 2147483647

File: math.bl

std.S64_MIN

S64_MIN : s64 : 

File: math.bl

std.S64_MAX

S64_MAX : s64 : 9223372036854775807

File: math.bl

std.U8_MIN

U8_MIN : u8 : 0

File: math.bl

std.U8_MAX

U8_MAX : u8 : 255

File: math.bl

std.U16_MIN

U16_MIN : u16 : 0

File: math.bl

std.U16_MAX

U16_MAX : u16 : 65535

File: math.bl

std.U32_MIN

U32_MIN : u32 : 0

File: math.bl

std.U32_MAX

U32_MAX : u32 : 4294967295

File: math.bl

std.U64_MIN

U64_MIN : u64 : 0

File: math.bl

std.U64_MAX

U64_MAX : u64 : 18446744073709551615

File: math.bl

std.sin

sin :: fn { 
    f32_sin; 
    f64_sin; 
}

File: math.bl

std.cos

cos :: fn { 
    f32_cos; 
    f64_cos; 
}

File: math.bl

std.floor

floor :: fn { 
    f32_floor; 
    f64_floor; 
}

File: math.bl

std.round

round :: fn { 
    f32_round; 
    f64_round; 
}

File: math.bl

std.pow

pow :: fn { 
    f32_pow; 
    f64_pow; 
}

File: math.bl

std.log

log :: fn { 
    f32_log; 
    f64_log; 
}

File: math.bl

std.log2

log2 :: fn { 
    f32_log2; 
    f64_log2; 
}

File: math.bl

std.log10

log10 :: fn { 
    f32_log10; 
    f64_log10; 
}

File: math.bl

std.sqrt

sqrt :: fn { 
    f32_sqrt; 
    f64_sqrt; 
}

File: math.bl

std.ceil

ceil :: fn { 
    f32_ceil; 
    f64_ceil; 
}

File: math.bl

std.atan2

atan2 :: fn { 
    C.atan2f; 
    C.atan2; 
}

File: math.bl

std.copysign

copysign :: fn { 
    C.copysignf; 
    C.copysign; 
}

File: math.bl

std.asin

asin :: fn { 
    C.asinf; 
    C.asin; 
}

File: math.bl

std.acos

acos :: fn { 
    C.acosf; 
    C.acos; 
}

File: math.bl

std.tan

tan :: fn { 
    C.tanf; 
    C.tan; 
}

File: math.bl

std.abs

abs :: fn { 
    f32_abs; 
    f64_abs; 
    s64_abs; 
}

File: math.bl

std.compare

compare :: fn { 
    f32_compare; 
    f64_compare; 
}

File: math.bl

std.degtorad

degtorad :: fn { 
    f32_degtorad; 
    f64_degtorad; 
}

File: math.bl

std.radtodeg

radtodeg :: fn { 
    f32_radtodeg; 
    f64_radtodeg; 
}

File: math.bl

std.max

max :: fn (a: ?T, b: T) T #inline

File: math.bl

std.min

min :: fn (a: ?T, b: T) T #inline

File: math.bl

std.lerp

lerp :: fn (a: ?T, b: T, fraction: T) T #inline

File: math.bl

std.smooth_step

smooth_step :: fn (a: ?T, b: T, fraction: T) T #inline

File: math.bl

std.clamp

clamp :: fn (v: ?T, minimum: T, maximum: T) T

File: math.bl