buildArgument<T> method
Implementation
T buildArgument<T>(
String name,
(T, String?) Function(double) builder, {
bool replaceDouble = false,
}) {
double num = 0;
late T t;
String? str;
do {
num = (Random().nextDouble() * 2 - 1) * double.maxFinite / 2;
(t, str) = builder(num);
} while (macros.containsKey(str ?? t.toString()) ||
macros.containsKey(num.toString()));
macros[str ?? t.toString()] = name;
macros[num.toString()] = replaceDouble ? name : null;
return t;
}