---
title: "NSSwapLittleDoubleToHost(_:)"
framework: foundation
role: symbol
role_heading: Function
path: "foundation/nsswaplittledoubletohost(_:)"
---

# NSSwapLittleDoubleToHost(_:)

Swaps the bytes of a number.

## Declaration

```swift
func NSSwapLittleDoubleToHost(_ x: NSSwappedDouble) -> Double
```

## Discussion

Discussion Converts the little-endian formatted value in x to the current endian format and returns the resulting value. If it is necessary to swap the bytes of x, this function calls NSSwapDouble(_:) to perform the swap.

## See Also

### Related Documentation

- [NSSwapBigDoubleToHost(_:)](foundation/nsswapbigdoubletohost(_:).md)
- [NSSwapHostDoubleToLittle(_:)](foundation/nsswaphostdoubletolittle(_:).md)
- [NSConvertSwappedDoubleToHost(_:)](foundation/nsconvertswappeddoubletohost(_:).md)

### Functions

- [NSConvertHostDoubleToSwapped(_:)](foundation/nsconverthostdoubletoswapped(_:).md)
- [NSConvertHostFloatToSwapped(_:)](foundation/nsconverthostfloattoswapped(_:).md)
- [NSConvertSwappedDoubleToHost(_:)](foundation/nsconvertswappeddoubletohost(_:).md)
- [NSConvertSwappedFloatToHost(_:)](foundation/nsconvertswappedfloattohost(_:).md)
- [NSHostByteOrder()](foundation/nshostbyteorder().md)
- [NSSwapBigDoubleToHost(_:)](foundation/nsswapbigdoubletohost(_:).md)
- [NSSwapBigFloatToHost(_:)](foundation/nsswapbigfloattohost(_:).md)
- [NSSwapBigIntToHost(_:)](foundation/nsswapbiginttohost(_:).md)
- [NSSwapBigLongLongToHost(_:)](foundation/nsswapbiglonglongtohost(_:).md)
- [NSSwapBigLongToHost(_:)](foundation/nsswapbiglongtohost(_:).md)
- [NSSwapBigShortToHost(_:)](foundation/nsswapbigshorttohost(_:).md)
- [NSSwapDouble(_:)](foundation/nsswapdouble(_:).md)
- [NSSwapFloat(_:)](foundation/nsswapfloat(_:).md)
- [NSSwapHostDoubleToBig(_:)](foundation/nsswaphostdoubletobig(_:).md)
- [NSSwapHostDoubleToLittle(_:)](foundation/nsswaphostdoubletolittle(_:).md)
