Compform Assignment 2 - Problem 1 · posted by vaibhav bhawsar Sep 21, 05:27

Problem 1. Complete the Vec2d class. Add the following methods to the class:

a. Subtract one vector from another and return the resulting vector.
b. Divide a vector by a float and return the resulting vector.
c. Calculate the length of a vector using Pythagorean theorem and return the resulting float.

Vec2d.h

Vec2d.cpp

Comment

Commenting is closed for this article.