BoundsExtensions.CalculateScale
Extension Method in BoundsExtensions
Declaration
public static float CalculateScale(this Bounds bounds, Bounds areaToFit, float epsilon = 1E-05F)
Description
Calculates the scale of the bounds required to fit inside another bounds.
Parameters
bounds | The bounds to calculate the scale of. |
areaToFit | The bounds to fit inside. |
epsilon | The minimum value for each axis to be considered (default=0.00001). |
Returns
float | The scale of the bounds required to fit inside the area. |
Overload
Declaration
public static float CalculateScale(this BoundsInt bounds, BoundsInt areaToFit)
Description
Calculates the scale of the bounds required to fit inside another bounds.
Parameters
bounds | The bounds to calculate the scale of. |
areaToFit | The bounds to fit inside. |
Returns
float | The scale of the bounds required to fit inside the area. |