Hi, How do i write a vector class to manipulate vectors in 3D; manipulate vector components in Cartesian, cylindrical, and spherical coordinate systems; add vectors; multiply by scalars; compute dot and cross products?
hawita
-3
Light Poster
Recommended Answers
Jump to Postclass vector { manipulateInCartesian (&vectorType); manipulateInSpherical (&vectorType); manipulateInCylindrical (&vectorType); vectorType add (vectorType, vectorType); vectorType multiplyByScalar (scalarVal, vectorType); vectorType dotProduct (vectorType, vectorType); vectorType crossProduct (vectorType, vectorType); };
Don't forget to implement the functions and define a vectorType.
All 3 Replies
Moschops
683
Practically a Master Poster
Featured Poster
StuXYZ
731
Practically a Master Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.