Vec2 dot and perpendicular methods

hi folks!

I'm working with JBox2D but I am assuming this follows Box2D's function sets.

I noticed the Vec2 class does not have a non-static function for dot and cross products,
that would enable the following, simpler call:
Code:
vectorA.dot(vectorB);

Only the Vec2::dot(vectorA, vectorB) as in (static) Vec2.(vectorA, vectorB) in Java is included.
Why is not a non-static function for the dot and cross products included?

Also, why is there not a method for producing a perpendicular to a vector?
Code:
Vec2::perpendicularLocal() {
  float t = x;
  x = -y;
  y = x;
}
For example.

Just wondering!
Thanks,
Kris
Basically, because I like it that way. 🙂
Wow and a reply from the one and only Erin Catto!
Absolutely love your work!

I tried making a physics engine myself, but dropped
it as there were too many details and things
that could (and did) go wrong.

Now I'm using the Java port of your stuff for a game in Android.

And hey, btw, what's with the "Are you Darth Vader?" in registration?

Kris
kristianlm wrote:
Wow and a reply from the one and only Erin Catto!
Absolutely love your work!

I tried making a physics engine myself, but dropped
it as there were too many details and things
that could (and did) go wrong.

Now I'm using the Java port of your stuff for a game in Android.

And hey, btw, what's with the "Are you Darth Vader?" in registration?

Kris


Apparently, many spam bots are programmed to believe they are Darth Vader.

Original thread: https://box2d.org/forum/viewtopic.php?t=3767