summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitmap.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitmap.h b/bitmap.h
index 09f3711..3ce4ba8 100644
--- a/bitmap.h
+++ b/bitmap.h
@@ -28,8 +28,9 @@ struct pixel {
T r, g, b;
/**
- * Create a pixel with given depth, from normalized color values.
- * For example: for 8bit pixel, with (1, 0.5, 0.25), we get: (255, 127, 63).
+ * Create a pixel of given depth, from normalized color values.
+ * r, g, b must in range [0, 1].
+ * For example: Set color depth to 8bit, for normalized color (1, 0.5, 0.25), we get: (255, 127, 63).
*/
static inline pixel<T> from_normalized(double r, double g, double b) {
const auto mod = (1ULL << (sizeof(T) * 8U)) - 1ULL;