2018-03-22 03:16:51 +00:00
|
|
|
package cc;
|
|
|
|
|
|
|
|
@:native("vector")
|
|
|
|
extern class Vector {
|
2021-03-22 04:54:22 +00:00
|
|
|
@:native("new") public static function create(x:Int, y:Int, z:Int):Vector;
|
2018-03-22 03:16:51 +00:00
|
|
|
|
2021-03-22 04:54:22 +00:00
|
|
|
public function add(other:Vector):Vector;
|
|
|
|
public function sub(other:Vector):Vector;
|
|
|
|
public function mul(n:Float):Vector;
|
|
|
|
public function dot(other:Vector):Float;
|
|
|
|
public function cross(other:Vector):Float;
|
|
|
|
public function length():Float;
|
|
|
|
public function normalize():Vector;
|
|
|
|
public function round():Vector;
|
|
|
|
@:native("tostring") public function toString():String;
|
2018-03-22 03:16:51 +00:00
|
|
|
}
|