aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Peach <mrpeach@users.sourceforge.net>2012-03-01 17:42:24 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 14:28:31 +0200
commitb8eb95d3c35842cf797548c458f9661c1a4e3b5c (patch)
tree6a11a2fc7c0df2e70a92288d3be216fe5fbad4be
parentb9d829c5e7f4f3cfe34c1a6fe50f3d8c5b60c174 (diff)
removed
svn path=/trunk/externals/loaders/pdlua/; revision=16043
-rw-r--r--examples/complex.lua30
1 files changed, 0 insertions, 30 deletions
diff --git a/examples/complex.lua b/examples/complex.lua
deleted file mode 100644
index 62d6d0e..0000000
--- a/examples/complex.lua
+++ /dev/null
@@ -1,30 +0,0 @@
-local P = {}
-if _REQUIREDNAME == nil then
- complex = P
-else
- _G[_REQUIREDNAME] = P
-end
-
--- imports
--- local sqrt = math.sqrt
-
--- no more external access after this point
-setfenv(1, P)
-
-function new (r, i) return {r=r, i=i} end
-
-i = new(0, 1)
-
-function add(c1, c2)
- return new(c1.r + c2.r, c1.i + c2.i)
-end
-
-function sub(c1, c2)
- return new(c1.r - c2.r, c1.i - c2.i)
-end
-
-function mul(c1, c2)
- return new(c1.r * c2.r - c1.i * c2.i, c1.r * c2.i + c1.i * c2.r)
-end
-
-return P