Ejemplo n.º 1
0
    public ZRSettings Clone()
    {
        ZRSettings setts = new ZRSettings();

        for (int i = 0; i < count; i++)
        {
            setts.Add(names[i], values[i].Clone());
        }
        setts.Init();
        return(setts);
    }
Ejemplo n.º 2
0
    public static ZRSettings operator /(ZRSettings one, float value)
    {
        ZRSettings settings = new ZRSettings();

        for (int i = 0; i < one.count; i++)
        {
            settings.Add(one.names[i], one.values[i] / value);
        }
        settings.Init();
        return(settings);
    }
Ejemplo n.º 3
0
    public static ZRSettings operator -(ZRSettings one, ZRSettings two)
    {
        ZRSettings settings = new ZRSettings();

        for (int i = 0; i < one.count; i++)
        {
            if (!settings.Contains(one.names[i]))
            {
                settings.Add(one.names[i], new ZRValue(0));
            }
            settings[one.names[i]] = one.values[i] - two[one.names[i]];
        }
        for (int i = 0; i < two.count; i++)
        {
            if (settings.Contains(two.names[i]))
            {
                continue;
            }
            settings.Add(two.names[i], two.values[i] * (-1));
        }
        settings.Init();
        return(settings);
    }