From 8b88692ea17885b9f191c08fbcb5dc1093269878 Mon Sep 17 00:00:00 2001 From: Keuin Date: Tue, 12 Apr 2022 11:07:12 +0800 Subject: Improve comments. --- bitmap.h | 5 +++-- 1 file 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 from_normalized(double r, double g, double b) { const auto mod = (1ULL << (sizeof(T) * 8U)) - 1ULL; -- cgit v1.2.3