Back to Aurora Vision Library Lite website

You are here: Start » Geometry 2D » Geometry 2D Spatial Transforms » RescalePointArray

RescalePointArray


Header: AVL.h
Namespace: avl

Changes the distances of points from an array to a reference point.

Syntax

void avl::RescalePointArray
(
	const atl::Array<avl::Point2D>& inPoints,
	atl::Optional<const avl::Point2D&> inReferencePoint,
	float inScale,
	bool inInverse,
	atl::Array<avl::Point2D>& outPoints
)

Parameters

Name Type Default Description
Input value inPoints const Array<Point2D>&
Input value inReferencePoint Optional<const Point2D&> NIL Point to which the distances will be changed (the mass center by default)
Input value inScale float 1.0f Scaling factor
Input value inInverse bool Switches to the inverse operation
Output value outPoints Array<Point2D>&

In-place Processing

This function supports in-place data processing - you can pass the same reference to inPoints and outPoints

Read more about In-place Computation.

Errors

List of possible exceptions:

Error type Description
DomainError Scale cannot be zero in an inverse rescaling of a point in RescalePointArray.