Fix compass doc errors (#721)

* Fix compass doc errors

* Another heading point error
This commit is contained in:
Galen Nickel
2018-03-27 15:02:38 -07:00
committed by Peli de Halleux
parent f70665d1a0
commit 0ec922c7f4
3 changed files with 14 additions and 13 deletions

View File

@ -15,18 +15,19 @@ The following example constantly checks the
and updates the screen with the direction.
```blocks
let degrees = 0
basic.forever(() => {
let heading = input.compassHeading()
if (heading < 45) {
degrees = input.compassHeading()
if (degrees < 45) {
basic.showString("N")
} else if (heading < 135) {
} else if (degrees < 135) {
basic.showString("E")
}
else if (heading < 225) {
} else if (degrees < 225) {
basic.showString("S")
}
else {
} else if (degrees < 315) {
basic.showString("W")
} else {
basic.showString("N")
}
})
```