public void Initializes_An_Arc_By_Three_Points() { // Arrange Arc arc = _exampleArc3D; // Assert arc.Length.Should().BeApproximately(71.333203, GSharkMath.MaxTolerance); arc.Radius.Should().BeApproximately(16.47719, GSharkMath.MaxTolerance); GSharkMath.ToDegrees(arc.Angle).Should().BeApproximately(248.045414, GSharkMath.MaxTolerance); }
public void It_Returns_A_Rotated_Transformed_Matrix() { // Arrange var center = new Point3(5, 5, 0); double angleInRadians = GSharkMath.ToRadians(30); // Act Transform transform = Transform.Rotation(angleInRadians, center); // Getting the angles. Dictionary <string, double> angles = Transform.GetYawPitchRoll(transform); // Getting the direction. var axis = Transform.GetRotationAxis(transform); // Assert GSharkMath.ToDegrees(angles["Yaw"]).Should().BeApproximately(30, GSharkMath.Epsilon); axis.Should().BeEquivalentTo(Vector3.ZAxis); }
/// <summary> /// Gets the text representation of an arc. /// </summary> /// <returns>Text value.</returns> public override string ToString() { return($"Arc(R:{Radius} - A:{GSharkMath.ToDegrees(Angle)})"); }
public void It_Returns_The_Degree_From_Radians(double radians, double degreeExpected) { System.Math.Round(GSharkMath.ToDegrees(radians), 0).Should().Be(degreeExpected); }