Created
May 4, 2016 16:39
-
-
Save NattyNarwhal/4584e3b0a3f4dd35aeb7978184041a38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = 2; i <= step; i++) | |
{ | |
var rd = (c1.R > c2.R ? c1.R - c2.R : c2.R - c1.R) / i; | |
var gd = (c1.G > c2.G ? c1.G - c2.G : c2.G - c1.G) / i; | |
var bd = (c1.B > c2.B ? c1.B - c2.B : c2.B - c1.B) / i; | |
if (showDiff) | |
{ | |
var nc = new RgbColor(rd, gd, bd); | |
bc.Add(nc); | |
} | |
else | |
{ | |
var r = (c1.R > c2.R ? c1.R - rd : c2.R - rd); | |
var g = (c1.G > c2.G ? c1.G - gd : c2.G - gd); | |
var b = (c1.B > c2.B ? c1.B - bd : c2.B - bd); | |
var nc = new RgbColor(r, g, b); | |
bc.Add(nc); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment