Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {==============================================================================]
- Explanation: Returns true if value is equal-to/between minimum and maximum.
- [==============================================================================}
- function InRangeE(value, minimum, maximum: Extended): Boolean;
- begin
- Result := ((value >= minimum) and (value <= maximum));
- end;
- begin
- ClearDebug;
- if InRangeE(124, 124, 125) then
- WriteLn('YES!');
- if InRangeE(124.999, 124, 125) then
- WriteLn('YES!');
- if InRangeE(125.001, 124, 125) then
- WriteLn('WTF?');
- end.
Advertisement
Add Comment
Please, Sign In to add comment