|
|
|
@ -159,7 +159,7 @@ namespace ImageSharp |
|
|
|
Guard.MustBeBetweenOrEqualTo(this.OutputChannelCount, 1, 15, nameof(this.OutputChannelCount)); |
|
|
|
|
|
|
|
bool isLengthDifferent = this.Values.Any(t => t.Length != this.OutputChannelCount); |
|
|
|
Guard.IsTrue(isLengthDifferent, nameof(this.Values), "The number of output values varies"); |
|
|
|
Guard.IsFalse(isLengthDifferent, nameof(this.Values), "The number of output values varies"); |
|
|
|
|
|
|
|
int length = 0; |
|
|
|
for (int i = 0; i < this.InputChannelCount; i++) |
|
|
|
@ -169,7 +169,7 @@ namespace ImageSharp |
|
|
|
|
|
|
|
length /= this.InputChannelCount; |
|
|
|
|
|
|
|
Guard.IsTrue(this.Values.Length != length, nameof(this.Values), "Length of values array does not match the grid points"); |
|
|
|
Guard.IsTrue(this.Values.Length == length, nameof(this.Values), "Length of values array does not match the grid points"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|