Vector.PrimeNumbers Method

TVec PrimeNumbers(Int32 n)

Fills vector with prime numbers, starting from 2 up to the value of n.

#NameTypeDescription
1nInt32

Result: stored in self (calling object), returns self for chaining

Remarks:

Fills calling vector with prime numbers, starting from 2 up to the value of n. The memory for at least n elements is allocated. The maximum value of n is 1000. The prime numbers are fetched from a precreated table.

Examples
Vector a;
a.PrimeNumbers(10); // a = new double[] {2,3,5,7}