title: Player bounds implementation and code review
body: <p>I need your help in review my code and give me some advices if i can improve it somehow.</p>
  <p>I'm following unity course and the guy did this script to check bounds:</p>
  <pre><code>if(transform.position.x &lt; -boundRange)
  {
      transform.position = new Vector3(-boundRange, transform.position.y, transform.position.z);
  }
  if(transform.position.x &gt; boundRange)
  {
      transform.position = new Vector3(boundRange, transform.position.y, transform.position.z);
  }
  </code></pre>
  <p>A found a bit different way to achieve the same thing with only one if statement like that:</p>
  <pre><code>if(Mathf.Abs(transform.position.x) + .1 &gt; boundRange)
      transform.position = new Vector3(
          transform.position.x / Mathf.Abs(transform.position.x) * boundRange, transform.position.y, transform.position.z
      );
  </code></pre>
  <p>And i want to understand which way is better and why and give me some more recommendations about good practices</p>