blob: 974fceb283850069bc3b664eef79f344ffa0544e [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/accelerometer/accelerometer_types.h"
#include "ui/chromeos/ui_chromeos_export.h"
#include "ui/gfx/geometry/vector3d_f.h"
namespace ui {
// Converts the acceleration data in |reading| into a gfx::Vector3dF.
UI_CHROMEOS_EXPORT const gfx::Vector3dF ConvertAccelerometerReadingToVector3dF(
const chromeos::AccelerometerReading& reading);
// A reading is considered stable if its deviation from gravity is small. This
// returns false if the deviation is too high, or if |source| is not present
// in the update.
UI_CHROMEOS_EXPORT bool IsAccelerometerReadingStable(
const chromeos::AccelerometerUpdate& update,
chromeos::AccelerometerSource source);
} // namespace ui