Ad
  • Custom User Avatar

    Its not bad.
    Just remember to make your code easy to understand to others.
    Also try not to repeat yourself. You are calculating 3 times the where the half is.
    Instead you can make a specific variable for it at the beginning solving both of your problems.