A two-dimensional vector with 64-bit integer precision.
struct
|
Vec2L
|
implements
|
IEquatable<Vec2L>
|
/ \ | X | | Y | \ /
The serialization helper object for values of Vec2L.
public
static
readonly
field
|
Serializer
|
||
type
|
ITypeSerializerEx<Vec2L>
|
The zero vector.
public
static
readonly
field
|
Zero
|
||
type
|
Vec2L
|
Returns the length of this vector.
public
property
|
Length
{
get
}
|
||
type
|
float64
|
||
value
|
|
The vector length. |
Returns the squared length of this vector.
public
property
|
LengthSqr
{
get
}
|
||
type
|
float64
|
||
value
|
|
The squared vector length. |
X-coordinate of vector.
public
readonly
field
|
X
|
||
type
|
int64
|
Y-coordinate of vector.
public
readonly
field
|
Y
|
||
type
|
int64
|
Creates a new instance of Vec2L.
public
constructor
|
Vec2L
(int64 x,
int64 y)
|
||
params
|
x
|
X-coordinate of vector. | |
y
|
Y-coordinate of vector. |
Adds this vector and the given one.
[Pure]
|
||||
public
method
|
Add
(Vec2L v)
|
|||
type
|
Vec2L
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Adds this vector and the given one.
[Pure]
|
||||
public
method
|
Add
(int64 x,
int64 y)
|
|||
type
|
Vec2L
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
returns
|
The resulting vector. |
Computes
the
cross
product
between
this
vector
and
the
given
one:
this
x
other
.
[Pure]
|
||||
public
method
|
Cross
(int64 z)
|
|||
type
|
Vec2L
|
|||
params
|
z
|
Z-component of vector (X- and Y-components are zero). | ||
returns
|
The cross product vector. |
Computes
the
cross
product
between
this
vector
and
the
given
one:
this
x
other
.
[Pure]
|
||||
public
method
|
Cross
(Vec2L v)
|
|||
type
|
int64
|
|||
params
|
v
|
The other vector. | ||
returns
|
The Z-component of the cross product vector (X- and Y-components are zero). |
Computes
the
cross
product
between
this
vector
and
the
given
one:
this
x
other
.
[Pure]
|
||||
public
method
|
Cross
(int64 x,
int64 y)
|
|||
type
|
int64
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
returns
|
The Z-component of the cross product vector (X- and Y-components are zero). |
Computes the dot product between this vector and the given one.
[Pure]
|
||||
public
method
|
Dot
(Vec2L v)
|
|||
type
|
int64
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Computes the dot product between this vector and the given one.
[Pure]
|
||||
public
method
|
Dot
(int64 x,
int64 y)
|
|||
type
|
int64
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
returns
|
The resulting vector. |
Checks if this vector and the given one are equal.
[Pure]
|
||||
public
method
|
Equals
(Vec2L v)
|
|||
type
|
bool
|
|||
params
|
v
|
The vector. | ||
returns
|
true
if
both
vectors
are
equal,
false
if
they
are
not. |
Checks if this vector and the given one are equal.
[Pure]
|
||||
public
method
|
Equals
(int64 x,
int64 y)
|
|||
type
|
bool
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
returns
|
true
if
both
vectors
are
equal,
false
if
they
are
not. |
[Pure]
|
||||
public
override
method
|
GetHashCode
()
|
|||
type
|
int32
|
Computes the component-wise maximum of this vector and the given one.
[Pure]
|
||||
public
method
|
Max
(Vec2L v)
|
|||
type
|
Vec2L
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Computes the component-wise maximum of this vector and the given one.
[Pure]
|
||||
public
method
|
Max
(int64 x,
int64 y)
|
|||
type
|
Vec2L
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
returns
|
The resulting vector. |
Computes the component-wise minimum of this vector and the given one.
[Pure]
|
||||
public
method
|
Min
(Vec2L v)
|
|||
type
|
Vec2L
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Computes the component-wise minimum of this vector and the given one.
[Pure]
|
||||
public
method
|
Min
(int64 x,
int64 y)
|
|||
type
|
Vec2L
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
returns
|
The resulting vector. |
Multiplies this vector with the given one.
[Pure]
|
||||
public
method
|
Mul
(Vec2L v)
|
|||
type
|
Vec2L
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Multiplies this vector with the given scalar value.
[Pure]
|
||||
public
method
|
Mul
(int64 v)
|
|||
type
|
Vec2L
|
|||
params
|
v
|
The scalar value. | ||
returns
|
The resulting vector. |
Multiplies this vector with the given one.
[Pure]
|
||||
public
method
|
Mul
(int64 x,
int64 y)
|
|||
type
|
Vec2L
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
returns
|
The resulting vector. |
Negates this vector.
[Pure]
|
||||
public
method
|
Neg
()
|
|||
type
|
Vec2L
|
|||
returns
|
The resulting vector. |
Performs a left bit shift on each component of this vector.
[Pure]
|
||||
public
method
|
ShiftLeft
(int32 v)
|
|||
type
|
Vec2L
|
|||
params
|
v
|
The shift amount. | ||
returns
|
The resulting vector. |
Performs a right bit shift on each component of this vector.
[Pure]
|
||||
public
method
|
ShiftRight
(int32 v)
|
|||
type
|
Vec2L
|
|||
params
|
v
|
The shift amount. | ||
returns
|
The resulting vector. |
Subtracts the given vector from this one.
[Pure]
|
||||
public
method
|
Sub
(Vec2L v)
|
|||
type
|
Vec2L
|
|||
params
|
v
|
The vector. | ||
returns
|
The resulting vector. |
Subtracts the given vector from this one.
[Pure]
|
||||
public
method
|
Sub
(int64 x,
int64 y)
|
|||
type
|
Vec2L
|
|||
params
|
x
|
X-component of vector. | ||
y
|
Y-component of vector. | |||
returns
|
The resulting vector. |
Returns a formatted string representation of this vector.
[Pure]
|
||||
public
override
method
|
ToString
()
|
|||
type
|
string
|
|||
returns
|
[not-null]
The
formatted
string
value. |