optimize math of plotgen

optimized the calcul for plot floor generation