-
metallurgy.alloy.element_is_in_range(element: str, composition: Composition, constraints: dict, direction: str, inclusive: bool =
True) bool[source] Returns True if an element is within its constrained percentage range, False if not.
- Parameters:¶
- element: str¶
The element to check the constraint range of.
- composition: Composition¶
The percentages of the alloy.
- constraints: dict¶
The constraints on the alloy.
- direction: str¶
Either “min” or “max” depending on which edge of the constraints are being checked.
- inclusive: bool =
True¶ True if an element should be considered inside the range including the endpoint.
Last update:
Jun 08, 2023