BoundsExtensions.GetScaleToFitInside(Bounds, Bounds) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Calculates how much scale is required for this UnityEngine.Bounds to fit inside another bounds without stretching.
public static float GetScaleToFitInside(this UnityEngine.Bounds bounds, UnityEngine.Bounds containerBounds);
static member GetScaleToFitInside : UnityEngine.Bounds * UnityEngine.Bounds -> single
<Extension()>
Public Function GetScaleToFitInside (bounds As Bounds, containerBounds As Bounds) As Single
Parameters
- bounds
- UnityEngine.Bounds
The bounds structure to examine.
- containerBounds
- UnityEngine.Bounds
The bounds of the container attempting to be fit into this object.
Returns
A single scale factor that can be applied to this object to fit inside the container.