---
title: "init(signOf:magnitudeOf:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/decimal/init(signof:magnitudeof:)"
---

# init(signOf:magnitudeOf:)

Creates and initializes a decimal with the sign and magnitude of the given decimals.

## Declaration

```swift
init(signOf: Decimal, magnitudeOf magnitude: Decimal)
```

## Parameters

- `signOf`: A doc://com.apple.foundation/documentation/Foundation/Decimal to use for the sign of the newly-created doc://com.apple.foundation/documentation/Foundation/Decimal.
- `magnitude`: A doc://com.apple.foundation/documentation/Foundation/Decimal to use for the magnitude of the newly-created doc://com.apple.foundation/documentation/Foundation/Decimal.

## See Also

### Creating a decimal from another decimal

- [NSDecimalCopy(_:_:)](foundation/nsdecimalcopy(_:_:).md)
