Settings

Choose language

grade(size name,(size value,float),(size value, float))

grade
  • Defines a number variable depending on the mentioned size constant. The number is changed according to arithmetic progression.

    Function parameters


  • name of size variable, e.g. sz1
  • several options in brackets - first value of the size, then desired value of a float

    Usage


    This function is applied when you want to define numeric values depending on the size, but you can't do it by simply taking a percentage of size or through other mathematic operations. For example, you don't want bust ease to always be 5% of the bust girth, as it will be too little for small sizes and too much for big sizes. Let's say you want the ease to be around 5 for smaller sizes, around 6 for medium sizes and around 7.5 for larger sizes. You can thus define your variable through grade function, referring to value of sz16 (bust girth) and setting several limits so that the value will be changed within these.

    If you set ea16 through grade function:
    ea16=grade(sz16,(40,5),(80,5),(90,6),(100,6),(150,7.5))
    the variable will be calculated in the following way:

  • It will equal exactly 5 cm for any size where bust girth is between 40 and 80.

    value of sz16value of ea16
    405
    ...5
    435
    ...5
    575
    805

  • For sizes, where bust girth is bigger than 80, but smaller than 90, it will be changed gradually:

    value of sz16value of ea16
    805
    815.1
    825.2
    835.3
    845.4
    855.5
    865.6
    875.7
    885.8
    895.9
    89.55.95
    906

  • It will equal exactly 6 cm for any size where bust girth is between 90 and 100.

    value of sz16value of ea16
    906
    ...6
    926
    ...6
    966
    1006

  • For sizes, where bust girth is bigger than 100, but smaller than 150, it will be changed gradually:

    value of sz16value of ea16
    1006
    1016.03
    1026.06
    1036.09
    1046.12
    1056.15
    .....
    1206.6
    .....
    1306.9
    .....
    1507.5

  • Previous article

    template("alias")

    Back to category

    Programming

    Next article

    info (objects, strings, variables)