Table of Contents

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

x bool

x-value of new VectorB object.

y bool

y-value of new VectorB object.

Fields

X

x-value of this VectorB object.

public bool X

Field Value

bool

Y

y-value of this VectorB object.

public bool Y

Field Value

bool

Methods

Equals(object)

This function compares the values of this vector and the vector given as parameter.

public override bool Equals(object obj)

Parameters

obj object

VectorB 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

a VectorB

First VectorB object.

b VectorB

Second VectorB object.

Returns

VectorB

Result of operation.

operator |(VectorB, VectorB)

Calculates the OR of two VectorB objects.

public static VectorB operator |(VectorB a, VectorB b)

Parameters

a VectorB

First VectorB object.

b VectorB

sSecond VectorB object.

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

vector1 VectorB

First VectorB object to compare.

vector2 VectorB

Second VectorB object to compare.

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

vector1 VectorB

First object to compare.

vector2 VectorB

Second object to compare.

Returns

bool

Returns true if the two objects are unequal.

operator !(VectorB)

Calculates the inverse VectorB object.

public static VectorB operator !(VectorB a)

Parameters

a VectorB

VectorB object to invert.

Returns

VectorB

Result of operation.