manifold-systems / manifold

Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.
http://manifold.systems/
Apache License 2.0
2.43k stars 125 forks source link

Velocity is a vector, speed is a scalar #475

Closed CC007 closed 1 year ago

CC007 commented 1 year ago

Describe the bug The name of the Velocity class is incorrect. Since it is implemented like a scalar, the name should be Speed. Velocity should refer to a vector, eg a speed in a certain direction.

To Reproduce Steps to reproduce the behavior:

Expected behavior The variable should be of type Speed, however it is of type Velocity

Desktop (please complete the following information):

Additional context https://www.physicsclassroom.com/class/1DKin/Lesson-1/Speed-and-Velocity

rsmckinney commented 1 year ago

Hi @CC007. Good point! However, the SI unit for velocity is m/s, the directional part is considered “understood.” This is standard nomenclature in physics, which is the context for this library.

If the directional attribute is significant in the calculations, manifold-science provides vector support. For instance, check out VelocityVector.