blob: 3ca5dfa3d87e220c38882b45345ae5258b4e91c8 [file] [log] [blame] [raw]
package li.cil.oc.util
import net.minecraftforge.common.ForgeDirection
object RotationHelper {
def fromYaw(yaw: Float ) = {
(yaw / 360 * 4).round & 3 match {
case 0 => ForgeDirection.SOUTH
case 1 => ForgeDirection.WEST
case 2 => ForgeDirection.NORTH
case 3 => ForgeDirection.EAST
}
}
}