{-# LANGUAGE Strict #-}

-- |
-- Maintainer: Jeremy Nuttall <jeremy@jeremy-nuttall.com>
-- Stability : experimental
module Numeric.Noise (
  -- * Noise functions

  -- ** Noise functions
  module NoiseTypes,
  noise2At,
  noise3At,

  -- ** 2D Noise
  cellular2,
  openSimplex2,
  superSimplex2,
  perlin2,
  value2,
  valueCubic2,

  -- ** 3D Noise
  perlin3,
  value3,
  valueCubic3,

  -- * Noise manipulation

  -- ** Math utility functions
  module NoiseUtility,

  -- ** Fractal Brownian Motion
  module Fractal,

  -- ** Cellular noise configuration
  module Cellular,
) where

import Numeric.Noise.Cellular as Cellular (
  CellularConfig (..),
  CellularDistanceFn (..),
  CellularResult (..),
  defaultCellularConfig,
 )
import Numeric.Noise.Cellular qualified as Cellular
import Numeric.Noise.Fractal as Fractal
import Numeric.Noise.Internal
import Numeric.Noise.Internal as NoiseTypes (
  Noise2,
  Noise3,
  Seed,
 )
import Numeric.Noise.Internal as NoiseUtility (
  clamp,
  clamp2,
  clamp3,
  cubicInterp,
  hermiteInterp,
  lerp,
  next2,
  next3,
  quinticInterp,
 )
import Numeric.Noise.OpenSimplex qualified as OpenSimplex
import Numeric.Noise.Perlin qualified as Perlin
import Numeric.Noise.SuperSimplex qualified as SuperSimplex
import Numeric.Noise.Value qualified as Value
import Numeric.Noise.ValueCubic qualified as ValueCubic

noise2At :: Noise2 a -> Seed -> a -> a -> a
noise2At :: forall a. Noise2 a -> Seed -> a -> a -> a
noise2At = Noise2 a -> Seed -> a -> a -> a
forall a. Noise2 a -> Seed -> a -> a -> a
unNoise2
{-# INLINE noise2At #-}

cellular2 :: (RealFrac a, Floating a) => CellularConfig a -> Noise2 a
cellular2 :: forall a. (RealFrac a, Floating a) => CellularConfig a -> Noise2 a
cellular2 = CellularConfig a -> Noise2 a
forall a. (RealFrac a, Floating a) => CellularConfig a -> Noise2 a
Cellular.noise2
{-# INLINE cellular2 #-}

openSimplex2 :: (RealFrac a) => Noise2 a
openSimplex2 :: forall a. RealFrac a => Noise2 a
openSimplex2 = Noise2 a
forall a. RealFrac a => Noise2 a
OpenSimplex.noise2
{-# INLINE openSimplex2 #-}

superSimplex2 :: (RealFrac a) => Noise2 a
superSimplex2 :: forall a. RealFrac a => Noise2 a
superSimplex2 = Noise2 a
forall a. RealFrac a => Noise2 a
SuperSimplex.noise2
{-# INLINE superSimplex2 #-}

perlin2 :: (RealFrac a) => Noise2 a
perlin2 :: forall a. RealFrac a => Noise2 a
perlin2 = Noise2 a
forall a. RealFrac a => Noise2 a
Perlin.noise2
{-# INLINE perlin2 #-}

noise3At :: Noise3 a -> Seed -> a -> a -> a -> a
noise3At :: forall a. Noise3 a -> Seed -> a -> a -> a -> a
noise3At = Noise3 a -> Seed -> a -> a -> a -> a
forall a. Noise3 a -> Seed -> a -> a -> a -> a
unNoise3
{-# INLINE noise3At #-}

perlin3 :: (RealFrac a) => Noise3 a
perlin3 :: forall a. RealFrac a => Noise3 a
perlin3 = Noise3 a
forall a. RealFrac a => Noise3 a
Perlin.noise3
{-# INLINE perlin3 #-}

value2 :: (RealFrac a) => Noise2 a
value2 :: forall a. RealFrac a => Noise2 a
value2 = Noise2 a
forall a. RealFrac a => Noise2 a
Value.noise2
{-# INLINE value2 #-}

value3 :: (RealFrac a) => Noise3 a
value3 :: forall a. RealFrac a => Noise3 a
value3 = Noise3 a
forall a. RealFrac a => Noise3 a
Value.noise3
{-# INLINE value3 #-}

valueCubic2 :: (RealFrac a) => Noise2 a
valueCubic2 :: forall a. RealFrac a => Noise2 a
valueCubic2 = Noise2 a
forall a. RealFrac a => Noise2 a
ValueCubic.noise2
{-# INLINE valueCubic2 #-}

valueCubic3 :: (RealFrac a) => Noise3 a
valueCubic3 :: forall a. RealFrac a => Noise3 a
valueCubic3 = Noise3 a
forall a. RealFrac a => Noise3 a
ValueCubic.noise3
{-# INLINE valueCubic3 #-}