// // if x / y = z / w and we are checking for x / z OR y / w // private bool HasImpliedRatio(SegmentRatio thatRatio) { if (thatRatio.HasSegment(lhs.largerSegment) && thatRatio.HasSegment(rhs.largerSegment)) { return(true); } if (thatRatio.HasSegment(lhs.smallerSegment) && thatRatio.HasSegment(rhs.smallerSegment)) { return(true); } return(false); }
private SegmentRatio GetOtherImpliedRatio(SegmentRatio thatRatio) { if (thatRatio.HasSegment(lhs.largerSegment) && thatRatio.HasSegment(rhs.largerSegment)) { return(new SegmentRatio(lhs.smallerSegment, rhs.smallerSegment)); } if (thatRatio.HasSegment(lhs.smallerSegment) && thatRatio.HasSegment(rhs.smallerSegment)) { return(new SegmentRatio(lhs.largerSegment, rhs.largerSegment)); } return(null); }
// // if x / y = z / w and we are checking for x / z OR y / w // private bool HasImpliedRatio(SegmentRatio thatRatio) { if (thatRatio.HasSegment(lhs.largerSegment) && thatRatio.HasSegment(rhs.largerSegment)) return true; if (thatRatio.HasSegment(lhs.smallerSegment) && thatRatio.HasSegment(rhs.smallerSegment)) return true; return false; }
private SegmentRatio GetOtherImpliedRatio(SegmentRatio thatRatio) { if (thatRatio.HasSegment(lhs.largerSegment) && thatRatio.HasSegment(rhs.largerSegment)) { return new SegmentRatio(lhs.smallerSegment, rhs.smallerSegment); } if (thatRatio.HasSegment(lhs.smallerSegment) && thatRatio.HasSegment(rhs.smallerSegment)) { return new SegmentRatio(lhs.largerSegment, rhs.largerSegment); } return null; }