Eliminate linear algebra lib dependency with self-made Vector2d class