# sample.swift

**Path:** `tests/swift/sample.swift`

## Cases

### addition

Represents addition operation

---

### subtraction

Represents subtraction operation

---

### multiplication

Represents multiplication operation

---

### negativeInput

Indicates that a negative number was provided as input

---

## Classes

### MathOperations

A utility class for performing mathematical operations.

This class provides various mathematical operations and is designed to be thread-safe.
It supports the following operations:
- Addition
- Subtraction
- Multiplication

**Examples:**

```swift
let math = MathOperations()
let result = math.multiply(5, 3)
```

---

## Enumerations

### OperationType

Defines the types of operations supported.

Use this enum to specify the type of operation to perform.

---

### MathError

Represents errors that can occur during mathematical operations.

- Case negativeInput: Thrown when a negative number is provided

---

## Functions

### multiply

Multiplies two numbers together.

This function performs multiplication of two integers and updates the `lastResult`.

**Examples:**

```swift
let result = multiply(5, 3) // Returns 15
```

---

## Properties

### lastResult

The result of the last operation performed.

This property is updated after each operation.

---

## Miscellaneous

### NumericOperation

A generic type for numeric operations.

This type allows operations on any numeric type that conforms to `Numeric`.

**Examples:**

```swift
let doubleOp = NumericOperation<Double>()
```

---

