Minecraft wiki entry for teleport, associated text: Specifies the rotation.
Must be a rotation with double‌[JE only] or float‌[BE only] number elements, including yaw and pitch, measured in degrees.
For the horizontal rotation (yaw), -180.0 for due north, -90.0 for due east, 0.0 for due south, 90.0 for due west, to 179.9 for just west of due north, before wrapping back around to -180.0.
For the vertical rotation (pitch), -90.0 for straight up to 90.0 for straight down.
Tilde notation can be used to specify a rotation relative to the executor's rotation‌[JE only] or the target's previous rotation‌[BE only].