Changeset 336 in flair-src for trunk/lib/FlairFilter


Ignore:
Timestamp:
Oct 8, 2019, 4:41:35 PM (2 years ago)
Author:
Sanahuja Guillaume
Message:

use float

Location:
trunk/lib/FlairFilter/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairFilter/src/JoyReference_impl.cpp

    r318 r336  
    174174  Vector3Df e_bar = theta_xy;
    175175  e_bar.Normalize();
    176   Quaternion q_xy(cos(theta_xy.GetNorm() / 2.0f),
    177                   e_bar.x * sin(theta_xy.GetNorm() / 2.0f),
    178                   e_bar.y * sin(theta_xy.GetNorm() / 2.0f), 0);
     176  Quaternion q_xy(cosf(theta_xy.GetNorm() / 2.0f),
     177                  e_bar.x * sinf(theta_xy.GetNorm() / 2.0f),
     178                  e_bar.y * sinf(theta_xy.GetNorm() / 2.0f), 0);
    179179  q_xy.Normalize();
    180180
  • trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle_impl.cpp

    r318 r336  
    7272
    7373  // configure trajectory
    74   angle_off = atan2(start_pos.y - pos_off.y, start_pos.x - pos_off.x);
     74  angle_off = atan2f(start_pos.y - pos_off.y, start_pos.x - pos_off.x);
    7575  CurrentTime = 0;
    7676}
     
    120120      if (CurrentTime < V / A) {
    121121        theta = angle_off + A / 2 * CurrentTime * CurrentTime / R;
    122         pos.x = R * cos(theta);
    123         pos.y = R * sin(theta);
    124         v.x = -A * CurrentTime * sin(theta);
    125         v.y = A * CurrentTime * cos(theta);
     122        pos.x = R * cosf(theta);
     123        pos.y = R * sinf(theta);
     124        v.x = -A * CurrentTime * sinf(theta);
     125        v.y = A * CurrentTime * cosf(theta);
    126126      } else {
    127127        if (!is_finishing) {
    128128          theta =
    129129              angle_off + V * V / (2 * A * R) + (CurrentTime - V / A) * V / R;
    130           pos.x = R * cos(theta);
    131           pos.y = R * sin(theta);
    132           v.x = -V * sin(theta);
    133           v.y = V * cos(theta);
     130          pos.x = R * cosf(theta);
     131          pos.y = R * sinf(theta);
     132          v.x = -V * sinf(theta);
     133          v.y = V * cosf(theta);
    134134        } else {
    135135          theta = angle_off + V * V / (2 * A * R) +
     
    138138                      (FinishTime - CurrentTime) / R +
    139139                  V * (CurrentTime - FinishTime) / R;
    140           pos.x = R * cos(theta);
    141           pos.y = R * sin(theta);
    142           v.x = -(V + A * (FinishTime - CurrentTime)) * sin(theta);
    143           v.y = (V + A * (FinishTime - CurrentTime)) * cos(theta);
     140          pos.x = R * cosf(theta);
     141          pos.y = R * sinf(theta);
     142          v.x = -(V + A * (FinishTime - CurrentTime)) * sinf(theta);
     143          v.y = (V + A * (FinishTime - CurrentTime)) * cosf(theta);
    144144        }
    145145      }
Note: See TracChangeset for help on using the changeset viewer.