summaryrefslogtreecommitdiff
path: root/api/rs_convert.spec
diff options
context:
space:
mode:
Diffstat (limited to 'api/rs_convert.spec')
-rw-r--r--api/rs_convert.spec10
1 files changed, 7 insertions, 3 deletions
diff --git a/api/rs_convert.spec b/api/rs_convert.spec
index ed531992..fbc2cf3d 100644
--- a/api/rs_convert.spec
+++ b/api/rs_convert.spec
@@ -81,9 +81,13 @@ arg: float g, "Green component."
arg: float b, "Blue component."
summary: Create a uchar4 RGBA from floats
description:
- Packs three or four floating point RGBA values into a uchar4. The RGBA values should be
- between 0.0 and 1.0 inclusive. Values outside of this range are clamped to this range.
- However numbers greater than INT_MAX or less than INT_MIN can result in undefined behavior.
+ Packs three or four floating point RGBA values into a uchar4.
+
+ The input values are typically between 0.0 and 1.0 inclusive. For input values outside
+ of this range, the resulting outputs will be clamped to be between 0 and 255. As this
+ clamping may be done after the input is multiplied by 255.f and converted to an integer,
+ input numbers greater than INT_MAX/255.f or less than INT_MIN/255.f can result in
+ undefined behavior.
If the alpha component is not specified, it is assumed to be 1.0, i.e. the result will
have an alpha set to 255.