---
title: "interpolatedValue(at:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gknoisemap/interpolatedvalue(at:)"
---

# interpolatedValue(at:)

Returns the value at the specified position in the noise map, interpolating results for positions not on the discrete sample grid.

## Declaration

```swift
func interpolatedValue(at position: vector_float2) -> Float
```

## Parameters

- `position`: The position to query in the noise map. Must be within the rectangle defined by the noise map’s doc://com.apple.gameplaykit/documentation/GameplayKit/GKNoiseMap/origin and doc://com.apple.gameplaykit/documentation/GameplayKit/GKNoiseMap/size properties.

## Return Value

Return Value The value at the specified position.

## Discussion

Discussion When you create a noise map from a GKNoise object, GameplayKit performs the noise generation and processing computations necessary to fill a discrete grid with noise samples. (You specify the size of the grid and its number of samples in the init(_:size:origin:sampleCount:seamless:) initializer.) You can use this method to get noise values for arbitrary positions in the noise field, regardless of whether those positions are aligned with the discrete grid. When you query a position not aligned with the grid, this method automatically samples nearby grid positions and interpolates the results. To query only positions within the discrete sample grid, use the value(at:) method instead.

## See Also

### Accessing Noise Values

- [value(at:)](gameplaykit/gknoisemap/value(at:).md)
- [setValue(_:at:)](gameplaykit/gknoisemap/setvalue(_:at:).md)
