1. 单位装饰器支持INT转换

2. 升级配置项
This commit is contained in:
csh
2024-08-14 13:45:00 +08:00
parent fedb1cd28a
commit 7936d19b98
13 changed files with 264 additions and 32 deletions
+7
View File
@@ -4,6 +4,7 @@ interface
function EmusToPoints(value): real;
function HalfPointToPoints(value): real;
function PercentToNumber(value): real;
function ToInt(value): integer;
implementation
@@ -37,5 +38,11 @@ uses TSUnitConverter;
return TSUnitConverter.PercentToNumber(new_value);
end;
function ToInt(value): integer;
begin
if ifNil(value) then return 0;
return tryStrtoInt(value, r) ? r : 0;
end;
end.