unifiedNumberClassOrNull

internal fun Iterable<KClass<*>>.unifiedNumberClassOrNull(options: UnifiedNumberTypeOptions = UnifiedNumberTypeOptions.DEFAULT): KClass<*>?

Determines the nearest common numeric type, in terms of complexity, all types in this.

Unsigned types are supported too even though they are not a Number instance, but unless the input solely exists of unsigned numbers, it will never be returned. Meaning, given a Number in the input, the output will always be a Number.

Return

The nearest common numeric type between the input types. If no common type is found, it returns null.

Parameters

See also