Skip to content

Makes math operations in Swift easier by adding automatic casting between Int, Float, CGFloat, and Double. Use with care.

License

Notifications You must be signed in to change notification settings

jquave/EasyCast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

EasyCast

Makes math operations in Swift easier by adding automatic casting between Int, Float, CGFloat, and Double

Usage

Instead of:

var sum = CGFloat(myInt) + CGFloat(myFloat)

Just do:

var sum = myInt + myFloat

That's pretty much it

When to use this

  • Swift's type-safety is littering your code base with obvious casts.
  • You are working on something where making some type assumption isn't a problem.
  • You know how it works.

When not to use this

  • You want type-safety above all else.
  • You are working on scientific or academic software.
  • You don't know how it works,

About

Makes math operations in Swift easier by adding automatic casting between Int, Float, CGFloat, and Double. Use with care.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages