domainWarp2 method
2D warps the input position using the current domain warp settings.
The reference implementation mutates its arguments in place; here the warped position is returned. Feed it into getNoise2.
Implementation
({double x, double y}) domainWarp2(double x, double y) {
switch (domainWarpFractalType) {
case DomainWarpFractalType.none:
return _domainWarpSingle2(x, y);
case DomainWarpFractalType.progressive:
return _domainWarpFractalProgressive2(x, y);
case DomainWarpFractalType.independent:
return _domainWarpFractalIndependent2(x, y);
}
}