fitInto

@safe
Vector2
fitInto
(
Vector2 reference
,
Vector2 space
)

Parameters

reference Vector2

Vector to use the aspect ratio of.

space Vector2

Available space; maximum size on each axis for the result vector.

Return Value

Type: Vector2

A vector smaller than space using the same aspect ratio as reference.

Meta