FIX: zmf membership function generator now behaves as expected

The input `x` variable required indexing for correct output.
Also fixed: minor math error and redundant calculation in zmf.