Translating Obj-C RGBtoHSV() function to Swift. min = MIN( r, MIN(g, b )); etc
问题 Could someone please help me with this function? This function is inside of a camera app that uses a filter algorithm to detect differences in colour variants etc. The syntax is very difficult for me. I don't know how to deal with the pointers in the arguments, the min and max variable syntax, what is delta etc? Could someone please translate for me? Much appreciated. Also should I be doing something with UIColor? Someone mentioned it below. I have no idea how to convert though. // r,g,b