Poses are similar to vectors, a useful multidimensional data structure.

Dairy supports DoublePose2D and DistancePose2D.

We’ll look at DistancePose2D, but DoublePose2D is super similar, outside of a couple of Distance specific utility methods.

That’s the basics! In Kotlin, we also get that cool destructuring to vector and heading.

Poses also have all expected mathematical operations defined on them: plus another pose, plus a vector, plus a heading, minus another pose, minus a vector, minus a heading, unaryPlus, unaryMinus, times by scalar, div by scalar. Take a look back at Distances in the Unit section to review this. The only operations not defined here is mod or rem, as well as times and div by other poses or vectors.

Poses don’t have any specific utilities, other than for doing intos for the heading Angle, which we won’t look at, as we’ve already reviewed these looking at Angless themselves.

DistancePose2Ds also have utilities for working with the DistanceUnits of the DistanceVector2D it stores.