aether::netcode::transcode::scale< T, Scale > Struct Template Reference

scale a number up by scale More...

#include <transcode.hh>

Public Types

using Output = T
 
using Input = T
 

Public Member Functions

bool apply (const T &input, T &output) override final
 transform input into output More...
 
bool invert (const T &input, T &output) override final
 Potentially lossy. More...
 

Static Public Attributes

static constexpr int64_t value = Scale
 

Detailed Description

template<typename T, int64_t Scale>
struct aether::netcode::transcode::scale< T, Scale >

scale a number up by scale

Member Typedef Documentation

using aether::netcode::transcode::transform_base< T , T >::Input = T
inherited
using aether::netcode::transcode::transform_base< T , T >::Output = T
inherited

Member Function Documentation

template<typename T , int64_t Scale>
bool aether::netcode::transcode::scale< T, Scale >::apply ( const T &  input,
T &  output 
)
inlinefinaloverridevirtual

transform input into output

Returns
whether the input is valid

Implements aether::netcode::transcode::transform_base< T, T >.

template<typename T , int64_t Scale>
bool aether::netcode::transcode::scale< T, Scale >::invert ( const T &  input,
T &  output 
)
inlinefinaloverridevirtual

Member Data Documentation

template<typename T , int64_t Scale>
constexpr int64_t aether::netcode::transcode::scale< T, Scale >::value = Scale
static