-
Notifications
You must be signed in to change notification settings - Fork 6
Distance
Eli Orona edited this page Dec 3, 2019
·
5 revisions
The Distance class is used to represent distance in the program. Its base unit is meters, but can be converted to any distance type (i.e. inches, feet, etc.).
Create a Distance based on a meter value:
Distance oneMeter = new Distance(1);
Create a Distance based on a DistanceUnit value:
Distance tenInches = new Distance(10, DistanceUnits.INCH);