Skip to content
This repository was archived by the owner on Aug 9, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions include/yards.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#ifndef YARDS_H
#define YARDS_H
// DECLARATION OF FUNCTIONS FOR CONVERSIONS
double yards_to_kilometers(double yards);
double yards_to_meters(double yards);
double yards_to_centimeters(double yards);
double yards_to_millimeters(double yards);
double yards_to_miles(double yards);
double yards_to_feet(double yards);
double yards_to_inches(double yards);
// DEFINED FUNCTION FOR CONVERSION OF YARDS TO KILOMETERS
double yards_to_kilometers(double yards) {
return yards / 1094;
}
// DEFINED FUNCTION FOR CONVERSION OF YARDS TO METERS
double yards_to_meters(double yards) {
return yards / 1.094;
}
// DEFINED FUNCTION FOR CONVERSION OF YARDS TO CENTIMETERS
double yards_to_centimeters(double yards) {
return yards * 91.44;
}
// DEFINED FUNCTION FOR CONVERSION OF YARDS TO MILLIMETERS
double yards_to_millimeters(double yards) {
return yards * 914.4;
}
// DEFINED FUNCTION FOR CONVERSION OF YARDS TO MILES
double yards_to_miles(double yards) {
return yards / 1760;
}
// DEFINED FUNCTION FOR CONVERSION OF YARDS TO FEET
double yards_to_feet(double yards) {
return yards * 3;
}
// DEFINED FUNCTION FOR CONVERSION OF YARDS TO INCHES
double yards_to_inches(double yards) {
return yards * 36;
}
#endif