noise1 method

  1. @override
double noise1(
  1. double x
)
override

Implementation

@override
double noise1(double x) {
  int x0 = floor(x);
  int x1 = x0 + 1;
  double xs = 0, ys = 0, zs = 0;
  xs = x - x0;
  double xf00 = lerp(valCoord1D(seed, x0), valCoord1D(seed, x1), xs);
  double xf10 = lerp(valCoord1D(seed, x0), valCoord1D(seed, x1), xs);
  double xf01 = lerp(valCoord1D(seed, x0), valCoord1D(seed, x1), xs);
  double xf11 = lerp(valCoord1D(seed, x0), valCoord1D(seed, x1), xs);
  double yf0 = lerp(xf00, xf10, ys);
  double yf1 = lerp(xf01, xf11, ys);
  return lerp(yf0, yf1, zs);
}