# Cleaner way of writing functions for multiple types

**URL:** <https://forums.swift.org/t/cleaner-way-of-writing-functions-for-multiple-types/9874>\
**Category:** Pitches\
**Created:** [February 13, 2018, 1:53pm UTC](https://forums.swift.org/t/cleaner-way-of-writing-functions-for-multiple-types/9874 "2018-02-13T13:53:07Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![hlovatt](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/hlovatt/32/3044_2.png) [@hlovatt](https://forums.swift.org/u/hlovatt)\
**Post date:** [February 14, 2018, 7:28am UTC](https://forums.swift.org/t/cleaner-way-of-writing-functions-for-multiple-types/9874/19 "2018-02-14T07:28:22Z")

</div>

As @taylorswift has suggested, I think it would be reasonable to add an `Angle` type with trig functions and pow, etc. to `FloatingPoint` to make numeric programming easier. These additions would be a solution to many problems like the one that started this thread.

On a related point, and already raised [elsewhere](https://forums.swift.org/t/floatingpoint-does-not-conform-to-expressiblebyfloatliteral/7433), `ExpressibleByFloatLiteral` should also be renamed so that it is obvious to people that it is only applicable to `BinaryFloatingPoint`.

---

_[View the full topic](https://forums.swift.org/t/cleaner-way-of-writing-functions-for-multiple-types/9874)._
