mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 06:11:24 +00:00
Use proper check for derivative sampler validation
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ public class DerivativeNoiseSamplerTemplate extends SamplerTemplate<DerivativeNo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean validate() throws ValidationException {
|
public boolean validate() throws ValidationException {
|
||||||
if (!(sampler instanceof DerivativeNoiseSampler)) throw new ValidationException("Provided sampler does not support calculating a derivative");
|
if (!DerivativeNoiseSampler.providesDerivative(sampler)) throw new ValidationException("Provided sampler does not support calculating a derivative");
|
||||||
return super.validate();
|
return super.validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user