// Path: core/src/com/chiptunetracker/util/CustomMath.java
// public class CustomMath {
// 
//     public static double mod(double a, double b) {
//         return (a % b + b) % b;
//     }
// }


import com.chiptunetracker.util.CustomMath;
import com.jsyn.data.Function;
package com.chiptunetracker.osc;


public class DemiTriFunction implements Function {

    @Override
    public double evaluate(double input) {
        input=input*2;
// Path: core/src/com/chiptunetracker/util/CustomMath.java
// public class CustomMath {
// 
//     public static double mod(double a, double b) {
//         return (a % b + b) % b;
//     }
// }


// Path: core/src/com/chiptunetracker/osc/DemiTriFunction.java
import com.chiptunetracker.util.CustomMath;
import com.jsyn.data.Function;

package com.chiptunetracker.osc;


public class DemiTriFunction implements Function {

    @Override
    public double evaluate(double input) {
        input=input*2;
        return (Math.abs(CustomMath.mod(input,2)-1)-0.5 + (Math.abs(CustomMath.mod((input*0.5),2)-1)-0.5)/2-0.1) * 0.7;