Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Basics » 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 | |
---|---|---|---|---|---|
![]() |
inLength | const int | 1 - +![]() |
10 | Length of output array |
![]() |
inBox | const Box& | Bounding box of generated point | ||
![]() |
inStep | const float | 0.0001 - ![]() |
1.0f | Minimal difference between two generated values on each coordinate |
![]() |
inSeed | Optional<int> | NIL | Random seed | |
![]() |
outArray | Array< Point2D >& |
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. |