コード例 #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);
        }
コード例 #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);
        }
コード例 #3
0
ファイル: Vibe_Remote.cs プロジェクト: cyan-f/Plug_Parser
        public Vibe_Remote()
        {
            isOverriding     = false;
            overrideStrength = 0;

            lastTime = DateTimeOffset.Now.ToUnixTimeMilliseconds();

            previousStrength = 0;

            // Initialize default settings
            settings = new Remote_Settings();
        }
コード例 #4
0
        private static double getWaveMinimum(Remote_Settings terms)
        {
            double val = (Math.Sin(SIN_MIN_RADIAN) * terms.variance) + terms.baseStrength;

            return(val);
        }
コード例 #5
0
        public static double getStrength(Remote_Settings terms)
        {
            double val = getWaveValue(terms);

            return(val);
        }