Math Functions
This is the MathFunctions class. This contains many useful math related methods that I use in other classes to simplify code elsewhere.
Author
Anyi Lin - 10158 Scott's Bots
Aaron Yang - 10158 Scott's Bots
Harrison Womack - 10158 Scott's Bots
Functions
Link copied to clipboard
This returns a Vector that is the sum of the two input Vectors.
Link copied to clipboard
Copies a Vector, but with a different reference location in the memory.
Link copied to clipboard
This computes the first Vector crossed with the second Vector, so a cross product.
Link copied to clipboard
This computes the dot product of the two Vectors.
Link copied to clipboard
This returns the smallest angle between two angles.
Link copied to clipboard
This gets the direction to turn between a start heading and an end heading.
Link copied to clipboard
Link copied to clipboard
This normalizes an angle to be between 0 and 2 pi radians, inclusive.
Link copied to clipboard
This normalizes a Vector to be of magnitude 1, unless the Vector is the zero Vector.
Link copied to clipboard
Link copied to clipboard
This rotates the given pose by the given theta,
Link copied to clipboard
This returns whether a specified number is within a second specified number by plus/minus 0.0001.
This returns whether a specified value is within a second specified value by plus/minus a specified accuracy amount.
Link copied to clipboard
This multiplies a Point by a scalar and returns the result as a Point
Link copied to clipboard
This multiplies a Vector by a scalar and returns the result as a Vector.
Link copied to clipboard
This subtracts the second Point from the first Point and returns the result as a Point.
Link copied to clipboard
This subtracts the second Pose from the first Pose and returns the result as a Pose.
Link copied to clipboard
This subtracts the second Vector from the first Vector and returns the result as a Vector.