interpolatedValue(at:)
Returns the value at the specified position in the noise map, interpolating results for positions not on the discrete sample grid.
Declaration
func interpolatedValue(at position: vector_float2) -> FloatParameters
Return Value
The value at the specified position.
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.