<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear devs, <br>
<br>
I have issues with the return of QgsTriangle.angles().</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://qgis.org/pyqgis/master/core/QgsTriangle.html?highlight=qgstriangle#qgis.core.QgsTriangle.angles" id="LPlnk647145">https://qgis.org/pyqgis/master/core/QgsTriangle.html?highlight=qgstriangle#qgis.core.QgsTriangle.angles</a><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Here is an example:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">>>> triangle = QgsTriangle()</span><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div>>>> triangle.setExteriorRing(QgsLineString([QgsPoint(78598.328125, 330538.375, 0), QgsPoint(78606.3203125, 330544, 0), QgsPoint(78601.46875, 330550.90625, 0), QgsPoint(78598.328125, 330538.375, 0)]))</div>
<div>>>> triangle.angles()</div>
<div>[0.7119509950830287, 0.0008857138004074727, 0.85795961791146]</div>
<div>>>> [math.degrees(a) for a in triangle.angles()]</div>
[40.79178723839677, 0.05074766261984076, 49.157465098983366]<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If we display this triangle, none of the angles have such a low angle.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<img style="max-width:100%" size="3057" contenttype="image/png" data-outlook-trace="F:1|T:1" src="cid:e23c990e-fd85-40e1-b5dc-158e5b175048"><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://prnt.sc/21p9ju6" id="LPlnk948425">https://prnt.sc/21p9ju6</a><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
We should have a near-90° angle, which we don't...</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://www.triangle-calculator.com/?what=vc&a=78598.328125&a1=330538.375&3dd=3D&a2=&b=78606.3203125&b1=330544&b2=&c=78601.46875&c1=330550.90625&c2=&submit=Solve&3d=0" id="LPlnk830602">https://www.triangle-calculator.com/?what=vc&a=78598.328125&a1=330538.375&3dd=3D&a2=&b=78606.3203125&b1=330544&b2=&c=78601.46875&c1=330550.90625&c2=&submit=Solve&3d=0</a></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Am I doing this wrong ?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards,</div>
</body>
</html>