Update documentation for vector type intrinsics

As suggested by MajorCooke
This commit is contained in:
Kevin Caccamo 2021-06-18 18:04:47 -04:00 committed by Christoph Oelckers
parent ef776d14ce
commit f4328f8187

View file

@ -148,18 +148,19 @@ enum EPrintLevel
// the built-in ZScript types // the built-in ZScript types
struct Vector2 struct Vector2
{ {
double x; Vector2(x, y);
double y; double x, y;
native double Length(); native double Length();
native Vector2 Unit(); native Vector2 Unit();
// The dot product of two vectors can be calculated like this: // The dot product of two vectors can be calculated like this:
// double d = a dot b; // double d = a dot b;
} }
struct Vector3 : Vector2 struct Vector3
{ {
double z; Vector3(x, y, z);
Vector2 xy; double x, y, z;
Vector2 xy; // Convenient access to the X and Y coordinates of a 3D vector
native double Length(); native double Length();
native Vector3 Unit(); native Vector3 Unit();
// The dot product of two vectors can be calculated like this: // The dot product of two vectors can be calculated like this:
@ -168,9 +169,11 @@ struct Vector3 : Vector2
// Vector3 d = a cross b; // Vector3 d = a cross b;
} }
// See https://zdoom.org/wiki/Dynamic_arrays for more details
struct Array<T> struct Array<T>
{ {
native int Size(); native int Size();
native void Copy(Array<T> other);
} }
*/ */