Пример #1
0
        /// <summary>
        /// Calculates the dot-product or cos(angle) between two vectors,
        /// with both normalized to a unit vector first.
        /// </summary>
        /// <param name="s">The other vector</param>
        /// <returns>Dot-Product of normalized vectors</returns>
        public double AngleUnitVector(Statistics s)
        {
            var stat1 = NormalizeUnit();
            var stat2 = s.NormalizeUnit();

            return(stat1.Angle(stat2));
        }
Пример #2
0
        /// <summary>
        /// Calculates the dot-product or cos(angle) between two vectors,
        /// with both normalized to a unit vector first.
        /// </summary>
        /// <param name="s">The other vector</param>
        /// <returns>Dot-Product of normalized vectors</returns>
        public double AngleUnitVector(Statistics s)
        {
            var stat1 = NormalizeUnit();
            var stat2 = s.NormalizeUnit();

            return stat1.Angle(stat2);
        }