cast<T extends ECPoint<SCALAR, POINT> > method
T
cast<T extends ECPoint<SCALAR, POINT> >()
Casts this point to T, throwing CastFailedException on mismatch.
Implementation
T cast<T extends ECPoint<SCALAR, POINT>>() {
if (this is! T) {
throw BuError(
DefaultErrorType.castFailed,
"Failed to cast value",
details: {"expected": "T", "value": runtimeType.toString()},
);
}
return this as T;
}