heightB property

num? get heightB

The height of side b of the triangle.

Implementation

num? get heightB {
  if (c == null || angleA == null) {
    throw Exception(
        "Side c and angleA must be known to calculate the height.");
  }
  return c! * sin(angleA!.rad); // Assuming angleC is in radians
}