Back to Aurora Vision Library website

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


Header: AVL.h
Namespace: avl
Module: FoundationLite

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


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


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.


List of possible exceptions:

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