Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
