Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public Vibe_Remote()
        {
            isOverriding     = false;
            overrideStrength = 0;

            lastTime = DateTimeOffset.Now.ToUnixTimeMilliseconds();

            previousStrength = 0;

            // Initialize default settings
            settings = new Remote_Settings();
        }
Ejemplo n.º 4
0
        private static double getWaveMinimum(Remote_Settings terms)
        {
            double val = (Math.Sin(SIN_MIN_RADIAN) * terms.variance) + terms.baseStrength;

            return(val);
        }
Ejemplo n.º 5
0
        public static double getStrength(Remote_Settings terms)
        {
            double val = getWaveValue(terms);

            return(val);
        }