GetSquareSimilarityPercentage(Size)
|
Determine the similarity percentage that the specified Size has with a square shape,
by dividing its shortest side between the longest one.
For example, having a Size of 4x4 (Width x Height),
this function will return a value of 1, meaning that all the
sides ( {Top=4, Bottom=4, Left=4, Right=4} ) are of equal length,
or in other words, it is a perfect square shape.
For example too, having a Size of 640x480 (Width x Height),
this function will return a value of 0.75, meaning that the length of the
sides ( {Top=640, Bottom=640, Left=480, Right=480} ) are 75% near to be a perfect square shape.
|
GetSquareSimilarityPercentage(Int32, Int32)
|
Determine the similarity percentage that the specified Size has with a square shape,
by dividing its shortest side between the longest one.
For example, having a Size of 4x4 (Width x Height),
this function will return a value of 1, meaning that all the
sides ( {Top=4, Bottom=4, Left=4, Right=4} ) are of equal length,
or in other words, it is a perfect square shape.
For example too, having a Size of 640x480 (Width x Height),
this function will return a value of 0.75, meaning that the length of the
sides ( {Top=640, Bottom=640, Left=480, Right=480} ) are 75% near to be a perfect square shape.
|