Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ hue2rgb()

static double Terraria.Main.hue2rgb ( double c,
double t1,
double t2 )
inlinestatic

Definition at line 44947 of file Main.cs.

44948 {
44949 if (c < 0.0)
44950 {
44951 c += 1.0;
44952 }
44953 if (c > 1.0)
44954 {
44955 c -= 1.0;
44956 }
44957 if (6.0 * c < 1.0)
44958 {
44959 return t1 + (t2 - t1) * 6.0 * c;
44960 }
44961 if (2.0 * c < 1.0)
44962 {
44963 return t2;
44964 }
44965 if (3.0 * c < 2.0)
44966 {
44967 return t1 + (t2 - t1) * (2.0 / 3.0 - c) * 6.0;
44968 }
44969 return t1;
44970 }

Referenced by Terraria.Main.hslToRgb().