Either expand to an IfExpr to special-case the non-numbers or use number() to force explicit conversions and obtain NaN as under 1.0.
或者扩展 IfExpr 引入非数字的特殊情况,或者像 1.0 那样使用 number() 强制显式转换得到 NaN。
Generics are useful because they provide stronger compile-time type checking, require fewer explicit conversions between data types, and reduce the need for boxing operations and run-time type checks.
泛型相当有用,因为他们提供强制的编译时类型检查,要求更少的数据类型之间的显式转换,并减少装箱拆箱的操作和运行时类型检查。
Explicit conversion is required by some compilers to support narrowing conversions.
有些编译器需要显式转换来支持收缩转换。
应用推荐