Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::DecimalScaleDownOperator Struct Reference

Static Public Member Functions

template<class INPUT_TYPE, class RESULT_TYPE>
static RESULT_TYPE Operation (INPUT_TYPE input, ValidityMask &mask, idx_t idx, void *dataptr)

Member Function Documentation

◆ Operation()

template<class INPUT_TYPE, class RESULT_TYPE>
RESULT_TYPE duckdb::DecimalScaleDownOperator::Operation ( INPUT_TYPE input,
ValidityMask & mask,
idx_t idx,
void * dataptr )
inlinestatic
213420 {
213421 // We need to round here, not truncate.
213422 auto data = (DecimalScaleInput<INPUT_TYPE> *)dataptr;
213423 // Scale first so we don't overflow when rounding.
213424 const auto scaling = data->factor / 2;
213425 input /= scaling;
213426 if (input < 0) {
213427 input -= 1;
213428 } else {
213429 input += 1;
213430 }
213431 return Cast::Operation<INPUT_TYPE, RESULT_TYPE>(input / 2);
213432 }

The documentation for this struct was generated from the following file: