@@ -41,4 +41,59 @@ The methods within the class can be used to convert the angle into different typ
4141
4242 This can be completed with any of the 5 angle classes within GeodePy. To complete math on the angle classes the following can be completed.
4343
44+ First a new angle needs to be defined. This will be done using the DDM Angle class
45+
46+ .. code :: python
47+
48+ angle2 = angles.DDMAngle(40 , 10.52 )
49+
50+ Now this new anlge class can be added or subtracted from the first class
51+
52+ .. code :: python
53+
54+ angle3 = angle1 + angle2
55+ angle4 = angle2 - angle1
56+
57+ print (angle3)
58+ print (type (angle3))
59+ print (angle4)
60+ print (type (angle4))
61+
62+ >> 70 16 13.2
63+ >> < class ' geodepy.angles.DMSAngle' >
64+ >> 10 4.82
65+ >> < class ' geodepy.angles.DDMAngle' >
66+
67+ As can be seen here, simple math can be completed on these classes. It should be noted that
68+ the result will have the class of the first variable in the calculation.
69+
70+ .. note :: Operations can only be preformed when both angles are an object.
71+
72+ The following operators can be preformed on angle objects:
73+
74+ +----------------------+------------------+
75+ | Operation | Method |
76+ +======================+==================+
77+ | Addition | '+' |
78+ +----------------------+------------------+
79+ | Subtraction | '-' |
80+ +----------------------+------------------+
81+ | Multiplication | '*' |
82+ +----------------------+------------------+
83+ | Division | '/' |
84+ +----------------------+------------------+
85+ | Equality | '==' |
86+ +----------------------+------------------+
87+ | Not Equal | '!=' |
88+ +----------------------+------------------+
89+ | Less Than | '<' |
90+ +----------------------+------------------+
91+ | Greater Than | '>' |
92+ +----------------------+------------------+
93+ | Modulo | '%' |
94+ +----------------------+------------------+
95+ | Round | round() |
96+ +----------------------+------------------+
97+
98+
4499
0 commit comments