---
title: "scale(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/decimal/formatstyle/scale(_:)"
---

# scale(_:)

Modifies the format style to use the specified scale.

## Declaration

```swift
func scale(_ multiplicand: Double) -> Decimal.FormatStyle
```

## Parameters

- `multiplicand`: The multiplicand to apply to the format style.

## Return Value

Return Value A decimal format style modified to use the specified scale.

## Discussion

Discussion The following example creates a default Decimal.FormatStyle for the en_US locale, and a second style that scales by a multiplicand of 0.001. It then applies each style to an array of decimal values. The formatting that the modified style applies expresses each value in terms of one-thousandths. let defaultStyle = Decimal.FormatStyle(locale: Locale(identifier: "en_US")) let scaledStyle = defaultStyle.scale(0.001) let nums: [Decimal] = [100.1, 1000.2, 10000.3, 100000.4, 1000000.5] let defaultNums = nums.map { defaultStyle.format($0) } // ["100.1", "1,000.2", "10,000.3", "100,000.4", "1,000,000.5"] let scaledNums = nums.map { scaledStyle.format($0) } // ["0.1001", "1.0002", "10.0003", "100.0004", "1,000.0005"]

## See Also

### Customizing style behavior

- [decimalSeparator(strategy:)](foundation/decimal/formatstyle/decimalseparator(strategy:).md)
- [grouping(_:)](foundation/decimal/formatstyle/grouping(_:).md)
- [locale(_:)](foundation/decimal/formatstyle/locale(_:).md)
- [notation(_:)](foundation/decimal/formatstyle/notation(_:).md)
- [precision(_:)](foundation/decimal/formatstyle/precision(_:).md)
- [rounded(rule:increment:)](foundation/decimal/formatstyle/rounded(rule:increment:).md)
- [sign(strategy:)](foundation/decimal/formatstyle/sign(strategy:).md)
- [Decimal.FormatStyle.Configuration](foundation/decimal/formatstyle/configuration.md)
- [NumberFormatStyleConfiguration](foundation/numberformatstyleconfiguration.md)
