2
* @file partial_movement.cpp
3
* @author Ugo Cupcic <ugo@shadowrobot.com>
4
* @date Tue Sep 27 10:05:01 2011
7
* Copyright 2011 Shadow Robot Company Ltd.
9
* This program is free software: you can redistribute it and/or modify it
10
* under the terms of the GNU General Public License as published by the Free
11
* Software Foundation, either version 2 of the License, or (at your option)
14
* This program is distributed in the hope that it will be useful, but WITHOUT
15
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19
* You should have received a copy of the GNU General Public License along
20
* with this program. If not, see <http://www.gnu.org/licenses/>.
22
* @brief This is the main class from which all the different types of movement
27
#include "sr_movements/partial_movement.hpp"
31
PartialMovement::PartialMovement()
34
PartialMovement::~PartialMovement()
37
double PartialMovement::get_target(double percentage)
44
int index = static_cast<int>( steps.size() * static_cast<double>(percentage) );
49
/* For the emacs weenies in the crowd.