It's a function because otherwise the "horizontalness" is stored in two places (a `isHorizontal` variable and the `orientation`). This function allows the information to be stored only in `orientation`.