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

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

AB

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

B

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

BC

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

C

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

CA

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

HasA

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

HasAB

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

HasAngles

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

HasB

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

HasBC

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

HasC

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

HasCA

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

HasEverything

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

HasLengths

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

KnownValues

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

RightA

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

RightB

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

RightC

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

Methods

Solve

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

Validate

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