FIX: zmf membership function generator now behaves as expected

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