A helper for returning the main axis for vector, given this direction.
vector
double mainAxisValue(Vector2 vector) { return vector[mainAxis.axisIndex]; }