示例#1
0
        /// <summary>
        /// 计算点积
        /// </summary>
        /// <param name="value"></param>
        /// <param name="b"></param>
        /// <returns></returns>
        public OsuPixel Calc(double value, OsuPixel b)
        {
            var ax = x + value * b.x;
            var ay = y + value * b.y;

            return(new OsuPixel(ax, ay));
        }
示例#2
0
        /// <summary>
        /// 计算两点间的距离
        /// </summary>
        /// <param name="a"></param>
        /// <returns></returns>
        public double Distance(OsuPixel a)
        {
            var innerX = x - a.x;
            var innerY = y - a.y;

            return(Math.Sqrt(innerX * innerX + innerY * innerY));
        }