Use bool
Use void instead of int
Use exceptions
Document
Throw exception instead of NaN
Ignore all other files
More clean