RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
FixedPoint< INTEGER_BITS, FRACTIONAL_BITS, SIGNED > 模板类 参考

#include <vrpn_FixedPoint.h>

Public 类型

typedef detail::IntegerOfSizeAndSignedness< INTEGER_BITS, SIGNED >::type IntegerType
 
typedef detail::IntegerOfSizeAndSignedness< INTEGER_BITS+FRACTIONAL_BITS, SIGNED >::type RawType
 

Public 成员函数

Constructors.

The bits of an integral type passed to the constructor will be interpreted as as fixed-point value. A floating-point type passed to the constructor will be converted to a fixed-point value.

 FixedPoint (typename detail::IntegerOfSizeAndSignedness< 8, SIGNED >::type x)
 
 FixedPoint (typename detail::IntegerOfSizeAndSignedness< 16, SIGNED >::type x)
 
 FixedPoint (typename detail::IntegerOfSizeAndSignedness< 32, SIGNED >::type x)
 
 FixedPoint (double x)
 
 FixedPoint (float x)
 
template<typename T >
get () const
 
Debugging functions.
RawType value () const
 

详细描述

template<int INTEGER_BITS, int FRACTIONAL_BITS, bool SIGNED = true>
class vrpn::FixedPoint< INTEGER_BITS, FRACTIONAL_BITS, SIGNED >

A fixed-point value class. All values are signed, two's-complement, by default.

模板参数
INTEGER_BITSThe number of bits devoted to the integer part.
FRACTIONAL_BITSThe number of bits devoted to the fractional part.

成员类型定义说明

◆ IntegerType

template<int INTEGER_BITS, int FRACTIONAL_BITS, bool SIGNED = true>
typedef detail::IntegerOfSizeAndSignedness<INTEGER_BITS,SIGNED>::type IntegerType

Find an integer type large enough to hold INTEGER_BITS.

成员函数说明

◆ get()

template<int INTEGER_BITS, int FRACTIONAL_BITS, bool SIGNED = true>
template<typename T >
T get ( ) const
inline
待办事项
add operators, lots and lots of operators?

Returns a floating-point representation of this fixed-point value.

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ value()

template<int INTEGER_BITS, int FRACTIONAL_BITS, bool SIGNED = true>
RawType value ( ) const
inline
待办事项
remove these functions after debugging

该类的文档由以下文件生成: