Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: IRSensor.cpp
- Revision:
- 2:f381fc3a8eaf
- Parent:
- 0:c88f41ac2cb7
diff -r 8b600c187fe6 -r f381fc3a8eaf IRSensor.cpp
--- a/IRSensor.cpp Wed Feb 26 12:49:12 2020 +0000
+++ b/IRSensor.cpp Wed Feb 26 14:20:16 2020 +0000
@@ -38,7 +38,7 @@
bit1 = (number >> 1)&1;
bit2 = (number >> 2)&1;
- float dist = -0.58f*(sqrt(distance)+0.58f);
+ float dist = -0.58f*sqrt(distance)+0.58f;
return dist;