Example #1
0
        /// <summary>
        /// Division by a scalar
        /// </summary>
        /// <param name="v">The vector</param>
        /// <param name="s">The scalar</param>
        /// <returns>v / s</returns>
        public static Vector operator /(Vector v, double s)
        {
            Vector result = v;

            result.Scale(1.0 / s);
            return(result);
        }
Example #2
0
        /// <summary>
        /// multiplication by a scalar
        /// </summary>
        /// <param name="s">the scalar</param>
        /// <param name="v">the vector</param>
        /// <returns>clear;</returns>
        public static Vector operator *(Vector v, double s)
        {
            Vector ret = v;

            ret.Scale(s);
            return(ret);
        }