mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Fixing comment.
This commit is contained in:
parent
8bbdc4e691
commit
ac571ece5a
1 changed files with 2 additions and 3 deletions
|
@ -775,9 +775,8 @@ class Scratch3GdxForBlocks {
|
|||
}
|
||||
|
||||
getTilt (args) {
|
||||
// When the peripheral is not connected, the acceleration magnitude
|
||||
// is 0 instead of ~9.8, which ends up registering a tilt value; so
|
||||
// we need to return 0 here to prevent returning a tilt value.
|
||||
// Tilt values are calculated using acceleration due to gravity,
|
||||
// so we need to return 0 when the peripheral is not connected.
|
||||
if (!this._peripheral.isConnected()) {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue