mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
Update documentation for vector type intrinsics
As suggested by MajorCooke
This commit is contained in:
parent
ef776d14ce
commit
f4328f8187
1 changed files with 8 additions and 5 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue