Struct Wcag2Measurement

Holds a WCAG 2 measurement together with its validity state.

struct Wcag2Measurement(T)
  
if (is(T == float) || is(T == double));

Read valid before using value when input may be outside the WCAG domain. Valid measurements expose their numeric result through value; invalid input produces an invalid measurement whose value is NaN.

Callers receive this type from the WCAG measurement functions rather than constructing validated measurements directly.

The natural floating-point .init state is NaN and is therefore invalid.

Properties

NameTypeDescription
valid[get] boolWhether this object contains a valid WCAG 2 measurement.
value[get] TMeasurement value. Invalid measurements return NaN here.

Aliases

NameDescription
Scalar Scalar type used by the measurement.