Skip to content

Instantly share code, notes, and snippets.

@videlais
Created December 25, 2013 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save videlais/d7efcba5d1202e4c39fc to your computer and use it in GitHub Desktop.
Save videlais/d7efcba5d1202e4c39fc to your computer and use it in GitHub Desktop.
Accelerometer3
self.getAlpha = function() {
return (alpha !== null) ? alpha : 0;
};
self.getBeta = function() {
return (beta !== null) ? beta : 0;
};
self.getGamma = function() {
return (gamma !== null) ? gamma : 0;
};
self.getAcceleration = function() {
return (acceleration !== null) ? acceleration : 0;
};
self.getAccelerationIncludingGravity = function() {
return (accelerationIncludingGravity !== null) ? accelerationIncludingGravity : 0;
};
self.getRotationRate = function() {
return (rotationRate !== null) ? rotationRate : 0;
};
self.getInterval = function() {
return (interval !== null) ? interval : 0;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment