fix a bug in PdfUtil#getSolidAngle

main
jbb01 6 months ago
parent 940e8ebc37
commit cb4dcc53f1

@ -13,6 +13,7 @@ public final class PdfUtil {
var j = b.minus(o).unit(); var j = b.minus(o).unit();
var k = c.minus(o).unit(); var k = c.minus(o).unit();
return 2 * Math.atan(Math.abs(i.times(j.cross(k))) / (1 + i.times(j) + j.times(k) + k.times(i))); var angle = 2 * Math.atan(Math.abs(i.times(j.cross(k))) / (1 + i.times(j) + j.times(k) + k.times(i)));
return angle < 0 ? 2 * Math.PI + angle : angle;
} }
} }

Loading…
Cancel
Save