Maths.FlatTriangleTrigonometry

public sealed class Maths.FlatTriangleTrigonometry
A class for finding unknown triangle properties based on known properties. This class solves for triangles in flat Euclidean space where the sum of the angles is known to equal pi radians.

Constructors

FlatTriangleTrigonometry

#
public FlatTriangleTrigonometry()

Properties

A

#
public double A { get; set; }
Gets or sets the angle in radians of the A corner. NaN is used to indicate an unknown angle.

AB

#
public double AB { get; set; }
Gets or sets the length of the edge opposite the C angle. NaN is used to indicate an unknown length.

B

#
public double B { get; set; }
Gets or sets the anglein radians of the B corner. NaN is used to indicate an unknown angle.

BC

#
public double BC { get; set; }
Gets or sets the length of the edge opposite the A angle. NaN is used to indicate an unknown length.

C

#
public double C { get; set; }
Gets or sets the angle in radians of the C corner. NaN is used to indicate an unknown angle.

CA

#
public double CA { get; set; }
Gets or sets the length of the edge opposite the B angle. NaN is used to indicate an unknown length.

HasA

#
public bool HasA { get; }
Gets whether the angle at corner A has been defined.

HasAB

#
public bool HasAB { get; }
Gets whether the length of edge AB has been defined.

HasAngles

#
public bool HasAngles { get; }
Gets whether all three angles have been set.

HasB

#
public bool HasB { get; }
Gets whether the angle at corner B has been defined.

HasBC

#
public bool HasBC { get; }
Gets whether the length of edge BC has been defined.

HasC

#
public bool HasC { get; }
Gets whether the angle at corner C has been defined.

HasCA

#
public bool HasCA { get; }
Gets whether the length of edge CA has been defined.

HasEverything

#
public bool HasEverything { get; }
Gets whether all properties have been assigned.

HasLengths

#
public bool HasLengths { get; }
Gets whether the lengths of all three edges has been set.

KnownValues

#
public int KnownValues { get; }
Gets the number of known values.

RightA

#
public bool RightA { get; }
Gets whether the A angle is a right angle.

RightB

#
public bool RightB { get; }
Gets whether the B angle is a right angle.

RightC

#
public bool RightC { get; }
Gets whether the C angle is a right angle.

Methods

Solve

#
public int Solve()
Solve all possible remaining edge lengths and corner angles. This method assumes the assigned values are valid.
Number of properties that could be deduced.

Validate

#
public IEnumerable<string> Validate()
Validate the current assigned values.