The OpenD Programming Language

nvgClampToByte

this is branchless for ints on x86, and even for longs on x86_64

pure nothrow @safe @nogc
ubyte
nvgClampToByte
(
T
)
(
T n
)
if (
__traits(isIntegral, T)
)

Meta