<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/Audio/Scattering/scaled(by:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation5AudioO10ScatteringV6scaled2byAES2fXE_tF"
  },
  "title" : "scaled(by:)"
}
-->

# scaled(by:)

Scale the scattering data by a frequency-dependent scalar value between -1 and 1.

```
func scaled(by frequencyDependentScalar: (Float) -> Float) -> Audio.Scattering
```

## Parameters

`frequencyDependentScalar`

A function with frequency as input and coefficient scalar as output.

## Discussion

- No adjustment is made to the coefficient when the scalar is 0.
- The coefficient is set to 0 when the scalar is -1.
- The coefficient is set to 1 when the scalar is +1.
- If the scalar value is between -1 and 0, the coefficient is adjusted by the percentage
  defined by the absolute value of the scalar between the original coefficient and 0.
- If the scalar value is between 0 and 1, the coefficient is adjusted by the percentage
  defined by the scalar between the original coefficient and 1.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)