Revision: 16329
http://sourceforge.net/p/skim-app/code/16329
Author: hofman
Date: 2026-05-31 16:13:00 +0000 (Sun, 31 May 2026)
Log Message:
-----------
use cbrt instead of pow
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2026-05-31 15:42:10 UTC (rev 16328)
+++ trunk/SKPDFView.m 2026-05-31 16:13:00 UTC (rev 16329)
@@ -2469,10 +2469,10 @@
// y=primaryOutset(x) approximately solves x*secondaryOutset(y)=y
// y=cubrt(1/2x^2)+..., x->0; y=sqrt(2)-1+1/2(sqrt(2)-1)(x-1)+..., x->1
-// 0.436947024419157 = 4/3cubrt(1/2)-3/2(sqrt(2)-1)
-// 0.057460060808152 = 1/3cubrt(1/2)-1/2(sqrt(2)-1)
+// 0.436947024419157 = 4/3cbrt(1/2)-3/2(sqrt(2)-1)
+// 0.057460060808152 = 1/3cbrt(1/2)-1/2(sqrt(2)-1)
static inline CGFloat primaryOutset(CGFloat x) {
- return pow(M_SQRT1_2 * x, 2.0/3.0) - 0.436947024419157 * x +
0.057460060808152 * x * x;
+ return cbrt(0.5 * x * x) - 0.436947024419157 * x + 0.057460060808152 * x *
x;
}
// an ellipse outset by 1/2*w*x and 1/2*h*secondaryOutset(x) circumscribes a
rect with size {w,h} for any x
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit