Rename and re-order freefall threshold constant
This commit is contained in:
1 parent
6cbc71f8d1
commit
3bdb13f049
1 file changed
+7
-7
@@ -49,18 +49,18 @@ const SHAKEN_THRESHOLD = 30;
|
||||
*/
|
||||
const FACING_THRESHOLD = 9;
|
||||
|
||||
/**
|
||||
* Threshold for acceleration magnitude, below which we are in freefall.
|
||||
* @type {number}
|
||||
*/
|
||||
const FREEFALL_THRESHOLD = 0.5;
|
||||
|
||||
/**
|
||||
* Acceleration due to gravity, in m/s^2.
|
||||
* @type {number}
|
||||
*/
|
||||
const GRAVITY = 9.8;
|
||||
|
||||
/**
|
||||
* Threshold for acceleration magnitude, below which we are in freefall.
|
||||
* @type {number}
|
||||
*/
|
||||
const FREEFALL = 0.5;
|
||||
|
||||
/**
|
||||
* Manage communication with a GDX-FOR peripheral over a Scratch Link client socket.
|
||||
*/
|
||||
@@ -769,7 +769,7 @@ class Scratch3GdxForBlocks {
|
||||
}
|
||||
|
||||
isFreeFalling () {
|
||||
return this.accelMagnitude() < FREEFALL;
|
||||
return this.accelMagnitude() < FREEFALL_THRESHOLD;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user