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

Author Topic: Simple math  (Read 165 times)

0 Members and 1 Guest are viewing this topic.

SFMLNewGuy

  • Newbie
  • *
  • Posts: 48
    • 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: 1462
    • 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: 12
    • 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: 3017
  • My number of posts is shown in hexadecimal.
    • View Profile
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
Kairos - Timing Library
Rectangular Boundary Collision - Rectangular SAT Collision

@Hapaxiation - Hapaxia on Twitter

 

anything