---
title: "remapValues(toCurveWithControlPoints:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gknoise/remapvalues(tocurvewithcontrolpoints:)"
---

# remapValues(toCurveWithControlPoints:)

Replaces values in the noise field by mapping them to a curve that passes through the specified control points.

## Declaration

```swift
func remapValues(toCurveWithControlPoints controlPoints: [NSNumber : NSNumber])
```

## Parameters

- `controlPoints`: A dictionary whose keys are input values in the existing noise, and whose values are the output values to replace the input values with.

## Discussion

Discussion When you call this method, the GKNoise class first interpolates the values specified in the controlPoints parameter to create a smooth curve. Then, this method uses the curve to replace values in the noise field. For example, passing the control points [-1.0: -1.0, -0.5: 0.5, 0.5: -0.5, 1.0: 1.0] defines an S-shaped curve that leaves the lowest and highest values in the noise field unchanged, but replaces moderately low values with moderately high values and vice versa.

## See Also

### Applying Operations to Noise Values

- [applyAbsoluteValue()](gameplaykit/gknoise/applyabsolutevalue().md)
- [invert()](gameplaykit/gknoise/invert().md)
- [raiseToPower(_:)](gameplaykit/gknoise/raisetopower(_:)-14715.md)
- [clamp(lowerBound:upperBound:)](gameplaykit/gknoise/clamp(lowerbound:upperbound:).md)
- [remapValues(toTerracesWithPeaks:terracesInverted:)](gameplaykit/gknoise/remapvalues(toterraceswithpeaks:terracesinverted:).md)
