Back to Aurora Vision Library Lite website

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

CreateRandomPointArray


Header: AVL.h
Namespace: avl

Creates array of random points inside given box.

Syntax

void avl::CreateRandomPointArray
(
	const int inLength,
	const avl::Box& inBox,
	const float inStep,
	atl::Optional<int> inSeed,
	atl::Array< avl::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.