Beispiel #1
0
        /// <summary>
        /// sin(n)*r の整数部を返す。n:0-511で一周。(小数部丸めあり)。
        /// </summary>
        /// <param name="n"></param>
        /// <param name="r"></param>
        /// <returns></returns>
        public int      Sin(int n, int r)
        {
            int l = (int)(Round.RShift((long)Sin(n) * r, 16));

            return(l);
        }
Beispiel #2
0
        /// <summary>
        /// cos(n)*r の整数部を返す。n:0-511で一周。(小数部丸めあり)。
        /// </summary>
        /// <param name="n"></param>
        /// <param name="r"></param>
        /// <returns></returns>
        public int      Cos(int n, int r)
        {
            int l = (int)(Round.RShift((long)Cos(n) * r, 16));

            return(l);
        }