aboutsummaryrefslogtreecommitdiff
path: root/examples/oop_example.lua
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2015-06-22 19:01:29 +0800
committerDeterminant <ted.sybil@gmail.com>2015-06-22 19:01:29 +0800
commit2497fd9e7a0fae5ee4887890d7a312e0e08a93b8 (patch)
tree382f97575bd2df9ee6abb1662b11b279fc22d72b /examples/oop_example.lua
parent196e9b48a3541caccdffc5743001cced70667091 (diff)
major change: use luarocks to manage project
Diffstat (limited to 'examples/oop_example.lua')
-rw-r--r--examples/oop_example.lua16
1 files changed, 0 insertions, 16 deletions
diff --git a/examples/oop_example.lua b/examples/oop_example.lua
deleted file mode 100644
index b753288..0000000
--- a/examples/oop_example.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-p = nerv.Point(0, 0) -- create a Point instance
-print(p)
-print(p:norm()) -- get 2-norm of the Point
-p:set_x(1.0)
-p:set_y(2.0)
-print(p:norm()) -- get 2-norm of the Point
-
-bp = nerv.BetterPoint(1, 2)
--- use methods from base class
-bp:set_x(1.0)
-bp:set_y(2.0)
-print(bp)
-print(bp:norm()) --get 1-norm of the Point
-
-print(p.__typename)
-print(bp.__typename)