Depending on what kind of accuracy you require with your floating-point number a double will be more precise than a float. The double has precision of at least 15 decimal …
There are two ways to write comments. The first is:The above doesn’t work for multiple lines though. It’s best to use:
You don’t need semicolons in Swift though if you want to put two statements on one line then do this: