mean-hue ( h1 h2 -- mh )


Vocabulary
colors.distances.private

Inputs
h1an object
h2an object


Outputs
mhan object


Definition


:: mean-hue ( h1 h2 -- mh )
h2 h1 - abs 180 >
[ h1 h2 + dup 360 < [ 360 + 2 / ] [ 360 - 2 / ] if ]
[ h1 h2 + 2 / ] if ;