Fix compass doc errors (#721)
* Fix compass doc errors * Another heading point error
This commit is contained in:
committed by
Peli de Halleux
parent
f70665d1a0
commit
0ec922c7f4
@ -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")
|
||||
}
|
||||
})
|
||||
```
|
||||
|
Reference in New Issue
Block a user