SFML community forums

Help => General => Topic started by: SFMLNewGuy on August 07, 2020, 12:16:52 am

Title: Simple math
Post by: SFMLNewGuy 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
Title: Re: Simple math
Post by: G. on August 07, 2020, 07:33:08 am
What is this nonsense?

https://en.sfml-dev.org/forums/index.php?topic=205.msg1056#msg1056
Title: Re: Simple math
Post by: TheYellowPrince 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.
Title: Re: Simple math
Post by: Raynobrak 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.
Title: Re: Simple math
Post by: Hapax 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.