summaryrefslogtreecommitdiff
path: root/vector.mod/vector.bmx
blob: c2ca8a455d80e8986686cda42f2b37a2af9aba50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Module noddybox.vector

ModuleInfo "Framework: Simple Vector class"
ModuleInfo "Copyright: Public Domain"
ModuleInfo "Author: Ian Cowburn"
ModuleInfo "Version: $Revision$"

' $Id$

Import brl.Basic

Strict

Type TVector

	' These are considered private
	'
	Field v:Float[4,4]

	' Creates a new vector
	'	
	' x		- X componenent
	' y		- Y componenent
	' z		- Z componenent
	'
	' Returns null for invalid parameters.
	'
	Function Create:TVector(x:Float, y:Float, z:Float)
		Local o:TVector
		
		o=New TVector
		
		Return o
	End Function
End Type