FunVec3TGet Method

Safely gets the element at the i-th position; returns None if the index is invalid.
C#
var underlyingArray = new int[] { 10, 11, 12 };
FunVec1<int> vec = new(underlyingArray);

Assert(jagvecged.Get(1) == Some(11));
Assert(vec.Get(-1).IsNone);
Assert(vec.Get(2).IsNone);
For other methods on the resulting optional, see Opt.

Definition

Namespace: Orx.Fun.FunVec
Assembly: Orx.Fun.FunVec (in Orx.Fun.FunVec.dll) Version: 1.0.0
C#
public Opt<T> Get(
	int i,
	int j,
	int k
)

Parameters

i  Int32
First index of the element to be retrieved.
j  Int32
Second index of the element to be retrieved.
k  Int32
Third index of the element to be retrieved.

Return Value

OptT

See Also