Back to Aurora Vision Library Lite website

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

RescalePoint


Header: AVL.h
Namespace: avl

Changes the distance of a point to a reference point.

Syntax

void avl::RescalePoint
(
	const avl::Point2D& inPoint,
	const avl::Point2D& inReferencePoint,
	float inScale,
	bool inInverse,
	avl::Point2D& outPoint
)

Parameters

Name Type Default Description
Input value inPoint const Point2D&
Input value inReferencePoint const Point2D& Point to which the distance will be changed
Input value inScale float 1.0f Scaling factor
Input value inInverse bool Switches to the inverse operation
Output value outPoint Point2D&

In-place Processing

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

Read more about In-place Computation.

Examples

RescalePoint performed on the sample point, inReferencePoint = (150.0, 150.0), inScale = -1.5 and inInverse = false. The inReferencePoint point is drawn on the first image in blue.

Errors

List of possible exceptions:

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