Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/scala/scalatutorial/sections/FunctionalLoops.scala
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,12 @@ object FunctionalLoops extends ScalaTutorialSection {
* (guess + x / guess) / 2
*
* def isGoodEnough(guess: Double, x: Double) =
* abs(guess * guess - x) < 0.001
* math.abs(guess * guess - x) < 0.001
* }}}
*
* If we don't want to repeat math.abs every time we use it, we can call `import math.abs`
* at the beginning of the file, and from then on call `abs` directly.
*
* Third, we define the `sqrt` function:
*
* {{{
Expand Down