Class WheelVector


  • public class WheelVector
    extends java.lang.Object
    A programmatic representation of a vector that wheels can be set to follow.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  WheelVector.VectorSet
      A set of four vectors corresponding to the four wheels of the bot.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double angle
      The angle (i.e., direction) of the vector in degrees.
      double speed
      The speed (i.e., magnitude) of the vector (in the range [-1, 1]).
      static WheelVector ZERO
      The vector with 0 for both components.
    • Constructor Summary

      Constructors 
      Constructor Description
      WheelVector​(double speed, double angle)
      Constructs a new WheelVector.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(WheelVector vector)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ZERO

        public static final WheelVector ZERO
        The vector with 0 for both components.
      • speed

        public final double speed
        The speed (i.e., magnitude) of the vector (in the range [-1, 1]).
      • angle

        public final double angle
        The angle (i.e., direction) of the vector in degrees.
    • Constructor Detail

      • WheelVector

        public WheelVector​(double speed,
                           double angle)
        Constructs a new WheelVector.
        Parameters:
        speed - the speed (i.e., the magnitude) of the vector in the range [-1, 1].
        angle - the angle (i.e., the direction) of the vector in degrees.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(WheelVector vector)