Skip to content

Commit 245cd6a

Browse files
committed
add rect and polar methods to CTPSA in Lua
1 parent c9db573 commit 245cd6a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/madl_gtpsa.mad

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,6 +1500,16 @@ function MC.carg (x, r)
15001500
_C.mad_ctpsa_carg(x, r) return r
15011501
end
15021502

1503+
function MC.rect (x, r)
1504+
r = chksiz(r,x) or ctpsa_alloc(x.d, x.mo)
1505+
_C.mad_ctpsa_rect(x, r) return r
1506+
end
1507+
1508+
function MC.polar (x, r)
1509+
r = chksiz(r,x) or ctpsa_alloc(x.d, x.mo)
1510+
_C.mad_ctpsa_polar(x, r) return r
1511+
end
1512+
15031513
function MC.unit (x, r)
15041514
r = chksiz(r,x) or ctpsa_alloc(x.d, x.mo)
15051515
_C.mad_ctpsa_unit(x, r) return r

0 commit comments

Comments
 (0)