public static double getSineValue(Remote_Settings terms) { double angle = (DateTimeOffset.Now.ToUnixTimeMilliseconds()) % (terms.period + (terms.period * terms.phaseShift)) / (terms.period) * RADIAN; double val = Math.Sin(angle); return(val); }
public static double getWaveValue(Remote_Settings terms) { // Angle in radians. double angle = (DateTimeOffset.Now.ToUnixTimeMilliseconds()) % (terms.period + (terms.period * terms.phaseShift)) / (terms.period) * RADIAN; double val = ((Math.Sin(angle) * (terms.variance)) + (terms.baseStrength)); return(val); }
public Vibe_Remote() { isOverriding = false; overrideStrength = 0; lastTime = DateTimeOffset.Now.ToUnixTimeMilliseconds(); previousStrength = 0; // Initialize default settings settings = new Remote_Settings(); }
private static double getWaveMinimum(Remote_Settings terms) { double val = (Math.Sin(SIN_MIN_RADIAN) * terms.variance) + terms.baseStrength; return(val); }
public static double getStrength(Remote_Settings terms) { double val = getWaveValue(terms); return(val); }