if (x <= 22.5f)
{
}
if (x >= 22.5f && x <= 67.5f)
{
}
if (x >= 67.5f && x <= 112.5f)
{
}
if (x >= 112.5f && x <= 157.5f)
{
}
if (x >= 157.5f && x <= 180.0f)
{
}
My code seems too complex in its current form. I reckon there must be a more efficient way of doing the above. Can someone lend me their ideas?