Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion addons/ofxAccelerometer/src/ofxAccelerometer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include "ofEvents.h"
#include "ofMathConstants.h"

#include <cstring>

typedef void (*ofxAccelCB)(ofPoint&); // typedef for accelerometer callback

class ofxAccelerometerHandler {
Expand Down Expand Up @@ -159,7 +161,7 @@ class ofxAccelerometerHandler {
if(length < 0.1) return;

//Clear matrix to be used to rotate from the current referential to one based on the gravity vector
bzero(matrix, sizeof(matrix));
memset(matrix, 0, sizeof(matrix));
matrix[3][3] = 1.0;

//Setup first matrix column as gravity vector
Expand Down
Loading