Exemplo n.º 1
0
        /// <summary>
        /// Sets the handle tip to the provided coordinate.
        /// </summary>
        /// <param name="handleTip">The handle tip.</param>
        public void SetHandleTip(CartesianCoordinate handleTip)
        {
            CartesianOffset offset = handleTip.OffsetFrom(ControlPoint);

            Radius   = offset.Length();
            Rotation = offset.SlopeAngle();
        }
Exemplo n.º 2
0
        public static void Length_Returns_Linear_Distance_Between_Offset_Points(double xI, double yI, double xJ, double yJ, double distance)
        {
            CartesianOffset offset = new CartesianOffset(
                new CartesianCoordinate(xI, yI),
                new CartesianCoordinate(xJ, yJ));

            Assert.AreEqual(distance, offset.Length(), Tolerance);
        }