FunVec1T   Conversion (T to FunVec1T)

1-dimensional vector with optional length, which always yields the same constant value.
C#
var agentSmith = GetSmith();
FunVec1<Agent> vec = new(agentSmith);
Assert(vec.Length1 == int.MaxValue); // since length1 is omitted
Assert(vec[0] == agentSmith);
Assert(vec[42] == agentSmith);
Assert(vec.Get(100) == Some(agentSmith));

FunVec1<Agent> vec = new(agentSmith, Some(50));
Assert(vec.Length1 == 50);
Assert(vec[0] == agentSmith);
Assert(vec[42] == agentSmith);
Assert(vec.Get(100).IsNone);

Definition

Namespace: Orx.Fun.FunVec
Assembly: Orx.Fun.FunVec (in Orx.Fun.FunVec.dll) Version: 1.0.0
C#
public static implicit operator FunVec1<T> (
	T constantValue
)

Parameters

constantValue  T

[Missing <param name="constantValue"/> documentation for "M:Orx.Fun.FunVec.FunVec1`1.op_Implicit(`0)~Orx.Fun.FunVec.FunVec1{`0}"]

Return Value

FunVec1T

See Also