units-d ~master (2021-03-13T17:32:42Z)
Home
Dub
Repo
isRational
experimental
units
Undocumented in source.
@
safe
template
isRational (
T
) {
@
safe
static if
(
is(typeof(T.numerator) : int) && is(typeof(T.denominator) : uint) && is(T : Rational!(T.numerator, T.denominator))
)
enum
isRational
;
@
safe
static if
(!(
is(typeof(T.numerator) : int) && is(typeof(T.denominator) : uint) && is(T : Rational!(T.numerator, T.denominator))
))
enum
isRational
;
}
Members
Manifest constants
isRational
enum
isRational
;
Undocumented in source.
isRational
enum
isRational
;
Undocumented in source.
Examples
static
assert
(
isRational
!(
Rational
!(-
2
,
1u
)));
static
assert
(!
isRational
!
Foo
);
Meta
Source
See Implementation
experimental
units
modules
si
enums
UnitString
baseUnit
functions
affine
convert
isConvertibleTo
pow
manifest constants
dimensionless
mixin templates
DefinePrefixSystem
UnitImpl
structs
AffineUnit
BaseUnit
BaseUnitExp
Conversion
Dimensionless
Prefix
PrefixedUnit
Quantity
ScaledUnit
templates
DerivedUnit
Difference
PrefixSystem
Product
Rational
Sum
isRational
prefixTemplate
scale
variables
fooToMile