From eb0c6e259b44473434a35ffcedd8b4ec6a92dc7b Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 4 Jun 2017 21:28:11 -0700 Subject: [PATCH] fix compass --- docs/projects/compass.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/projects/compass.md b/docs/projects/compass.md index 38c6667c..9c3bfe4c 100644 --- a/docs/projects/compass.md +++ b/docs/projects/compass.md @@ -32,12 +32,13 @@ basic.forever(() => { ## Step 3 -If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the @boardname@. +If `degrees` is less than `45` or greater than `315`, +then the compass heading is mostly pointing toward North. Display `N` on the @boardname@. ```blocks basic.forever(() => { let degrees = input.compassHeading(); - if (degrees < 45) { + if (degrees < 45 || degrees > 315) { basic.showString("N"); } }); @@ -51,7 +52,7 @@ If `degrees` is less than 135, the @boardname@ is mostly pointing East. Display ```blocks basic.forever(() => { let degrees = input.compassHeading(); - if (degrees < 45) { + if (degrees < 45 || degrees > 315) { basic.showString("N"); } else if (degrees < 135) { @@ -68,7 +69,7 @@ If `degrees` is less than 225, the @boardname@ is mostly pointing South. Display ```blocks basic.forever(() => { let degrees = input.compassHeading(); - if (degrees < 45) { + if (degrees < 45 || degrees > 315) { basic.showString("N"); } else if (degrees < 135) { @@ -87,7 +88,7 @@ If none of these conditions returned true, then the @boardname@ must be pointing ```blocks basic.forever(() => { let degrees = input.compassHeading(); - if (degrees < 45) { + if (degrees < 45 || degrees > 315) { basic.showString("N"); } else if (degrees < 135) {