src/perlin/private/common

Shared methods for generating noise

Procs

proc grad(hash: int; x, y, z: float): float {.inline, ...raises: [], tags: [],
    forbids: [].}
Calculate the dot product of a randomly selected gradient vector and the 8 location vectors

Templates

template hash(self: Noise; unit: Point2D[int]; ux, uy: untyped;
              pos: Point2D[float]; gx, gy: untyped): untyped
Generates the hash coordinate given three expressions
template hash(self: Noise; unit: Point3D[int]; ux, uy, uz: untyped;
              pos: Point3D[float]; gx, gy, gz: untyped): untyped
Generates the hash coordinate given three expressions
template map(point: Point; apply: untyped): untyped
Applies a callback to all the values in a point
template mapIt(point: Point; kind: typedesc; apply: untyped): untyped
Applies a callback to all the values in a point