Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: What goes here?  (Read 1268 times)

0 Members and 1 Guest are viewing this topic.

Chay Hawk

  • Full Member
  • ***
  • Posts: 101
    • View Profile
    • Email
What goes here?
« on: August 15, 2014, 11:02:27 pm »
Ok so i'm trying to make some collisions and im reading the API document and I see:

"sf::Vector2f point = ...;"

What goes after point?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10990
    • View Profile
    • development blog
    • Email
AW: What goes here?
« Reply #1 on: August 16, 2014, 12:13:45 am »
Anything that can assign to the given sf::Vector2f on the left side.

Please explain what you're trying to do and where in the documentation something like this was written.
You know programming doesn't work like grammar where you can leave blanks and others have to fill things in... ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

BeautiCode

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: What goes here?
« Reply #2 on: August 16, 2014, 09:48:26 pm »
sf::Vector2f has a constructor which asks for 2 floats in it's arguments.
The f in sf::Vector2f means float, so it will hold 2 floats.
Heres an example:
sf::Vector2f variable=sf::Vector2f(1,2); //The value of variable.x will be 1 and the value of variable.y will be 2

I hope I helped!