---
id: noise-value2
name: Noise.value2
category: noise
kind: namespace-method
tokens: Noise.value2
sig: Noise.value2(x, y, seed) -> fixed
tip: 2D value (lattice) noise, deterministic, in [-1, 1].
order: 1
ns: Noise
member: value2
---
Samples 2D **value noise** at (x, y) for the given seed and returns a fixed in [-1, 1]. Value noise assigns a pseudo-random value to each integer lattice point and smoothly interpolates between them with a quintic fade — the cheapest generator here, with a slightly blocky, retro character that suits low-detail height fields, dithering, and per-cell variation.
Because it is a pure function of (x, y, seed) in fixed point, the same arguments always produce the same value on every platform. Sample at a fractional frequency (scale the coordinates) to change feature size.
Parameters:
- `x`, `y` — the sample coordinates (`fixed`); the integer part picks a cell
- `seed` — the field selector; different seeds give independent worlds
```ludic
program Value {
entry {
let seed = 1337
let n = Noise.value2(fixed(3) / fixed(8), fixed(5) / fixed(8), seed)
print(Math.floor(Noise.unit(n) * fixed(100))) # a 0..100 height
}
}
```