Beispiel #1
0
 /// <summary>
 /// Convert angle in degree to angle in rads.
 /// </summary>
 /// <param name="degree">Converted angle in degree.</param>
 /// <returns>Return angle in rads</returns>
 public static double ToRads(double degree)
 {
     return(AngleUtils.ToRads(degree));
 }
Beispiel #2
0
 /// <summary>
 /// Get robots horizontal speed.
 /// </summary>
 /// <param name="r"></param>
 /// <returns>Robot's horizontal speed</returns>
 public static double GetSpeedY(Robot r)
 {
     return(r.Power * r.Motor.MAX_SPEED / 100.0 * Math.Sin(AngleUtils.ToRads(r.AngleDrive)));
 }