Question: ELEC 1520, Homework structs, 100 points submission instructions: Your homework will be submitted electronically to canvas. The file format must be a zip file. Your
ELEC 1520, Homework structs, 100 points submission instructions: Your homework will be submitted electronically to canvas. The file format must be a zip file. Your file should be named elec 1520 hw struct your name.zip. substitute your first and last name for "your name" in the file name. Example: Students name is Sparky Watts. The file name is elec 1520 hw struct sparky watts.zip. Break your programming solution up into three separate files: main.c, vector.c, and vector.h Place these in your compressed file. The program must include the following information in comments: (1) problem number, (2) course information, (3) assignment, (4) date, and (5) student name. 1. Write a program that creates a vector struct and a set of functions that perform vector calculations. mag-calculate and return the magnitude of the vector add calculate and return vector c: vector c vector a vector b sub-calculate and return vector c: vector c vector a vector b mult multiply a vector by a scalar dist calculate and return the distance between two points dot-calculate and return the dot product of two vectors normalize normalize the vector to a length of 1 heading-calculate the angle of rotation for this vector. (rotation about origin) -ralr lata and ret ern the annla hetv reen tv
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
