Using kernel_float::prelude
When working with Kernel Float, you’ll find that you need to prefix every function and type with the kernel_float::...
prefix.
This can be a bit cumbersome.
It’s strongly discouraged not to dump the entire kernel_float
namespace into the global namespace (with using namespace kernel_float
) since
many symbols in Kernel Float may clash with global symbols, causing conflicts and issues.
To work around this, the library provides a handy kernel_float::prelude
namespace. This namespace contains a variety of useful type and function aliases that won’t conflict with global symbols.
To make use of it, use the following code:
#include "kernel_float.h"
using namespace kernel_float::prelude;
// You can now use aliases like `kf`, `kvec`, `kint`, etc.
The prelude defines many aliases, include the following:
Prelude name |
Full name |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
… |
… |