Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add your name, the date, and Assignment 2 in the comments at the top of your file. Define macid to be your MacID. 3 .
Add your name, the date, and Assignment in the comments at the
top of your file. Define macid to be your MacID.
The file contains a type definition that can be used to represent any
element of a three dimensional vector space
type VectorD DoubleDouble,Double,Double
The file contains three functions getX, getY, getZ, and getM of type
VectorD Double that return the xyzm coordinates, respec
tively.
The file includes a function named scalarMult of type Double
VectorD VectorD that returns the scalar multiplication of its
inputs, ie s xyzms xs ys zs m
The file includes a function named add of type VectorD VectorD
VectorD that performs D vector addition, iex y z m
x y z m x x y y z z m m
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started