Skip to content

ossianpe/CoordinateCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CoordinateCalculator

Reads in text file with 3D coordinates. Sets first coordinate as home point and calculates distance from subsequent points. Prints coordinates ordered by distance.

v1.0


Program Definition:

Reads from textfile called "inFile.txt" and calculates the
distance from the first coordinate to the remaining
coordinates in the text file. The program sorts the
coordinates by distance and prints them onscreen.

Identifier Dictionary:

class coordHandler |
_______________________|
/
| x --|
| y |__ struct coordinates
| z | (defined as coordinates hpoint &
| distance --| vector cdvec)
| setHomePoint
| readNextLine
| calculateDistance
| printSortedByDistance
| sortVector
| pushElements
| incrementVectorSize

About

Reads in text file with 3D coordinates. Sets first coordinate as home point and calculates distance from subsequent points. Prints coordinates ordered by distance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages