diff options
author | Keuin <[email protected]> | 2022-04-12 11:07:12 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-04-12 11:07:12 +0800 |
commit | 8b88692ea17885b9f191c08fbcb5dc1093269878 (patch) | |
tree | 0b7cf04fcfd4d4fddc429d41a413d3618af3d84a /bitmap.h | |
parent | a97b38299d5f8297d15077160df5439d274bd571 (diff) |
Improve comments.
Diffstat (limited to 'bitmap.h')
-rw-r--r-- | bitmap.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |