Conversion RGB-HSV

Memo for myself: how to convert from/to RGB and HSV. It is explained on this Wikipedia page, and can be implemented in C as follow (given equalf, modulof are respectively the equality and modulo operators for floating point values):

and:

2021-10-10
in All, C programming language, Computer graphics,
8 views
Copyright 2021 Baillehache Pascal