Skip to content

pierreoosthuizen/math_functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

math_functions

primecheck.swift

This extends the Int class in Swift, adding a new function isPrime. The function is called from the Int object after it has been intialized.

let myInteger = 5

if myInteger.isPrime {
  print ("My integer is prime!")
} else {
  print ("My integer is not prime.")
}

About

This repository is a list of functions that I created in work and play, all relating to math functions.

Topics

Resources

License

Stars

Watchers

Forks

Languages