map
fun Vector2.map( sourceRectangle: Rectangle, targetRectangle: Rectangle, clamp: Boolean = false): Vector2
Content copied to clipboard
Remaps Vector2 from a position on the sourceRectangle to a proportionally equivalent position on the targetRectangle.
Parameters
clamp
Clamps remapped value within the bounds of targetRectangle.
fun List<Vector2>.map( sourceRectangle: Rectangle, targetRectangle: Rectangle, clamp: Boolean = false): List<Vector2>
Content copied to clipboard
Maps all elements in a List<Vector2>
from sourceRectangle to targetRectangle. If clamp is true all elements are clamped within the bounds of targetRectangle.