DiGrande.it

Blind, Braille and Embossing Technologies

This site uses cookies to personalize content and ads, provide social media features and analyze links. By closing this banner or continuing to browse, you consent to their use.
Read the DiGrande.it Cookie Policy

Mid- Returns the average percentage fraction of the graph size

Function that returns the fraction of the size of the drawing area taken from the average of the percentage of its width and height.

- Mid(P): float

Parameters:

- (float) P: percent of the average fraction to be derived.

Description:

To obtain the size in points of a portion of the drawing area, the Mid function can be used. This function accepts as arguments the percentage P indicating the fraction of the desired area. The function returns the fractional mean value between the width and height. For example, if the drawing area has a width of 200 points and a height of 150 points, and you want an average portion of 50% of the area, the Mid function will return 87.5 points.

This instruction corresponds to the fractional numeric type "number+mid." As in the previous example, "Mid(50)" produces the same result as "50mid." The difference between the two forms is that the fractional numeric type requires only explicit numeric values, while the Mid instruction can accept variables, constants, functions, or other types of expressions.