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:
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?
Just wondering!
Thanks,
Kris
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.float t = x;
x = -y;
y = x;
}
Just wondering!
Thanks,
Kris