title: SFML getPosition in if statement
body: <p>I need something like this, but I have no idea how to do it.</p>
  
  <pre><code>sprite.move(0, 0.4 * time.asMiliseconds());
  if (sprite.getPosition &lt;= *bottom of the screen*)
  {
      sprite.setPosition(0,0);
  }
  </code></pre>
  
  <p>The the sprite is moving down, but when it goes of the screen, It needs to spawn back up top. I thought a simple if statement would do the job, but it doesn't. I don't know what the output is from .getPosition. </p>
  
  <p>Writing it to the console isn't working aswell so I have no idea what to do.</p>
  
  <pre><code>std::cout &lt;&lt; sprite.getPosition() &lt;&lt; std::endl;
  </code></pre>