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

Author Topic: Simple math  (Read 2539 times)

0 Members and 1 Guest are viewing this topic.

SFMLNewGuy

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Simple math
« on: August 07, 2020, 12:16:52 am »
Hello,

I'm so rusty with math, it has been my downfall learning how to program. I honestly need to take a course again and I have something called Khan to check out.

With that said, I just have a simple question regarding this formula

A + B = ||A||||B||           

Do I add or multiply the magnitude of A and B. I'm having one hell of a time finding clarity to this? I'd assume multiply, but from the examples I see, it looks like you use addition.

Any help, sorry if this is the wrong place to ask. I'm just kind of stuck on this.

EDIT: And if someone could explain why SFML used degrees instead of radians I would appreciate it. Thanks

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Simple math
« Reply #1 on: August 07, 2020, 07:33:08 am »

TheYellowPrince

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Simple math
« Reply #2 on: August 07, 2020, 10:21:40 pm »
I know the boolean operator || in programming generally means OR ("if A || B is true do...") so I think this wouldn't compile on a program. I think this forum is meant for questions related to SFML and such, so I don't think you'll get much help here. Maybe try reddit? Sorry bud.

Raynobrak

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Simple math
« Reply #3 on: August 11, 2020, 08:10:22 am »
Hi,
There is no operator to compute the magnitude of a Vector. Vertical bars '|'  have a different meaning in maths and in programming.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Simple math
« Reply #4 on: August 13, 2020, 04:00:06 pm »
Hello.

A + B = ||A||||B||           
I expect this formula is:
A + B = ||A|| ||B||
and I would read it as:
A plus B is the same as the product of the magnitude of A and the magnitude of B.

although what that means in context would be down to what the formula is for.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything