Skip to content

Instantly share code, notes, and snippets.

@videlais

videlais/accelerometer.js Secret

Created Dec 25, 2013
Embed
What would you like to do?
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