br_ufraction
br_ufraction
346
type can be used to represent numbers in the range [0,+1)*1. Although used internally, this type is not generally supported by the BRender API. One of the few places in which it is used is in specifying lighting coefficients of materials.
Under the floating point library, br_ufraction
346 is a
float
. Under the fixed point library, br_ufraction
346 is a 16 bit unsigned fixed point number.
typedef
scalar.h
for precise declaration)
float br_ufraction Floating point Unsigned Fraction
br_fixed_luf br_ufraction Fixed - Long Unsigned Fraction (0.16)
br_scalar
332
and use that type's arithmetic macros instead.BR_UFRACTION(x)Convert
x
from any numeric constant to br_ufraction
346
.
BR_SCALAR_EPSILONSmallest positive fractional value.
br_scalar
332
as an intermediary.
br_scalar
332
br_ufraction BrScalarToUFraction(br_scalar s)Converts
s
from br_scalar
332
to br_ufraction
346
. It is up to the application to ensure the value is in the required range.
br_scalar
332
as an intermediary.
br_scalar
332
br_scalar BrUFractionToScalar(br_ufraction f)Converts
s
from br_ufraction
346
to br_scalar
332
. It is up to the application to ensure the value is in the required range.