The hash code for position.
position
static int hash(Position position) => Object.hash(position.x, position.y, position.optZ, position.optM);