Struct VectorB
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
This struct defines a two-dimensional vector of boolean values.
[Serializable]
public struct VectorB
- Inherited Members
Constructors
VectorB(bool, bool)
Creates a VectorB from two boolean values.
public VectorB(bool x, bool y)
Parameters
Fields
X
x-value of this VectorB object.
public bool X
Field Value
Y
y-value of this VectorB object.
public bool Y
Field Value
Methods
Equals(object)
This function compares the values of this vector and the vector given as parameter.
public override bool Equals(object obj)
Parameters
objobjectVectorB to be compared with this vector.
Returns
- bool
Returns true if both object values are equal.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Converts a VectorB object into a string of format (true/false ; true/false).
public override string ToString()
Returns
- string
String containing the vector information.
Operators
operator &(VectorB, VectorB)
Calculates the AND of two VectorB objects.
public static VectorB operator &(VectorB a, VectorB b)
Parameters
Returns
- VectorB
Result of operation.
operator |(VectorB, VectorB)
Calculates the OR of two VectorB objects.
public static VectorB operator |(VectorB a, VectorB b)
Parameters
Returns
- VectorB
Result of operation.
operator ==(VectorB, VectorB)
Compares two VectorB for equality. The comparison will be done by comparing the values of the two x- and y-components, respectively.
public static bool operator ==(VectorB vector1, VectorB vector2)
Parameters
Returns
- bool
Returns true if the two objects are equal.
operator !=(VectorB, VectorB)
Compares two VectorB} for inequality. The comparison will be done by comparing the values of the two x- and y-components, respectively.
public static bool operator !=(VectorB vector1, VectorB vector2)
Parameters
Returns
- bool
Returns true if the two objects are unequal.
operator !(VectorB)
Calculates the inverse VectorB object.
public static VectorB operator !(VectorB a)
Parameters
aVectorBVectorB object to invert.
Returns
- VectorB
Result of operation.