Beispiel #1
0
        //#endif

        #endregion

        #region Additional operations

        //#ifdef Pow PolarClassName


        /// <summary>
        /// Computes exponent.
        /// </summary>
        /// <param name="f"></param>
        /// <returns></returns>
        public static Complexd Pow(Complexd cmp, double f)
        {
            Polard polar = cmp.Polar;

            return(Pow(polar, f));
        }
Beispiel #2
0
 /// <summary>
 /// Checks for near equality.
 /// </summary>
 /// <param name="c1">The first cylinder.</param>
 /// <param name="c2">The second cylinder.</param>
 /// <param name="eps">The maximum error tolerance.</param>
 /// <returns>Are they nearly equal.</returns>
 public static bool NearEqual(Cylindricald c1, Cylindricald c2, double eps)
 {
     return(Polard.NearEqual(c1.Polar, c2.Polar, eps) && MathHelper.NearEqual(c1.Z, c2.Z, eps));
 }
Beispiel #3
0
 /// <summary>
 /// Constructor using polar + z.
 /// </summary>
 /// <param name="p0">The polar coordinate.</param>
 /// <param name="zr">The z distance.</param>
 public Cylindricald(Polard p, double z)
 {
     Polar = p;
     Z     = z;
 }
Beispiel #4
0
        //#ifdef NearEqual


        /// <summary>
        /// Checks for near equality.
        /// </summary>
        /// <param name="c1">The first cylinder.</param>
        /// <param name="c2">The second cylinder.</param>
        /// <returns>Are they nearly equal.</returns>
        public static bool NearEqual(Cylindricald c1, Cylindricald c2)
        {
            return(Polard.NearEqual(c1.Polar, c2.Polar) && MathHelper.NearEqual(c1.Z, c2.Z));
        }
Beispiel #5
0
        //#endif

        #endregion

        #region Constructors

        /// <summary>
        /// Constructor using all three parameters.
        /// </summary>
        /// <param name="phi">The angle as for normal polar coordinate.</param>
        /// <param name="r">The distance in X-Y plane.</param>
        /// <param name="zr">The z offset.</param>
        public Cylindricald(double phi, double r, double z)
        {
            this.Polar = new Polard(phi, r);
            this.Z     = z;
        }