Pose
vectorlib::Pose — fields, methods, parameters and return types.
pub struct PoseA position and heading.
Units are inches. theta is degrees or radians depending on where the pose came from;
the arithmetic operators only touch x and y and keep the left-hand side's theta,
exactly as LemLib does.
Fields
Prop
Type
Methods
Prop
Type
new
pub const fn new(x: f32, y: f32, theta: f32) -> SelfCreate a new pose. LemLib's Pose(x, y) is Pose::new(x, y, 0.0).
Parameters
Prop
Type
Returns
Selflerp
pub fn lerp(self, other: Pose, t: f32) -> PoseLinearly interpolate between two poses. Keeps this pose's theta.
Parameters
Prop
Type
Returns
Posedistance
pub fn distance(self, other: Pose) -> f32Distance between two poses.
Parameters
Prop
Type
Returns
f32angle
pub fn angle(self, other: Pose) -> f32Angle between two poses, in radians, standard position.
Parameters
Prop
Type
Returns
f32rotate
pub fn rotate(self, angle: f32) -> PoseRotate the pose's position by an angle (radians, counter-clockwise). Keeps theta.
Parameters
Prop
Type
Returns
Pose