Back to FabImage Library website

You are here: Start » Function Reference » Geometry 2D » Geometry 2D Basics » CreateRandomPointArray

CreateRandomPointArray


Header: FIL.h
Namespace: fil
Module: FoundationLite

Creates array of random points inside given box.

Syntax

C++
C#
 
void fil::CreateRandomPointArray
(
	const int inLength,
	const fil::Box& inBox,
	const float inStep,
	ftl::Optional<int> inSeed,
	ftl::Array< fil::Point2D >& outArray
)

Parameters

Name Type Range Default Description
Input value inLength const int 1 - + 10 Length of output array
Input value inBox const Box& Bounding box of generated point
Input value inStep const float 0.0001 - 1.0f Minimal difference between two generated values on each coordinate
Input value inSeed Optional<int> NIL Random seed
Output value outArray ArrayPoint2D >&

Errors

List of possible exceptions:

Error type Description
DomainError Value of inStep is greater than height of box in CreateRandomPointArray.
DomainError Value of inStep is greater than width of box in CreateRandomPointArray.