If a number becomes an integer when rationalized, use an integer; otherwise stick to the original number. This is achieved by a simple function, f[x] :
f[x_] := If[IntegerQ[n = Rationalize[x]], n, x]
Testing...
f[67.5] f[0.] f[45.] (* Out *) 67.5 0 45
You cannot just Rationalize all the values as shown below:

To find out how this works in your case, just paste (f/@) into your code to reformat the values output from Range :
Grid@Partition [ Text[Style[ ToString[(f/@ Range[0, 180, 22.5])[[#]]] <> "\[Degree]", Bold, 16, GrayLevel[(8 - #)/10]]] & /@ Range[8], 2, 1]
So,

DavidC
source share