Class Module

From SolarStrike wiki
Revision as of 14:35, 29 May 2014 by Elverion (talk | contribs) (Created page with "== new == '''class class.new([class baseclass])''' Create a new class. If baseclass is given, creates a child of it, and set the 'parent' variable to its base. This will '''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

new

class class.new([class baseclass])

Create a new class. If baseclass is given, creates a child of it, and set the 'parent' variable to its base.

This will not call the constructor. That is what the __call operator on the returned class is for: to create an instance of the class.


vector3d

vector3d class.vector3d([number x, number y, number z])

Create a new table (class) of vector3d. If x, y and z are given, the new vector3d retains the given values.

The vector3d class contains metamethods for operations such as vector scaling and dot product.