## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csFixed16 Class Reference
[Geometry utilities]

Encapsulation of a 16.16 fixed-point number. More...

`#include <csgeom/fixed.h>`

List of all members.

## Public Member Functions

int32 | GetFixed () const
| Get "raw" fixed point number.
| operator int () const
| Get integer part.
csFixed16 & | operator+= (const csFixed16 &x)
| Add a fixed point number to another.
csFixed16 & | operator= (float f)
| Assign floating point number.

## Friends

csFixed16 | operator * (const csFixed16 &v1, float v2)
| Multiply a fixed point number with a float, result is fixed.
csFixed16 | operator- (const csFixed16 &v1, float v2)
| Subtract a float number from a fixed point, result is fixed.
csFixed16 | operator- (float v1, const csFixed16 &v2)
| Subtract a fixed point number from a float, result is fixed.
csFixed16 | operator- (const csFixed16 &v1, const csFixed16 &v2)
| Subtract two fixed point numbers.
csFixed16 | operator>> (const csFixed16 &v1, int n)
| Shift right.

## Detailed Description

Encapsulation of a 16.16 fixed-point number.

Todo:
  More operators.

Definition at line 36 of file fixed.h.

## Member Function Documentation

int32 csFixed16::GetFixed | ( |  | ) | const`[inline]`

| Get "raw" fixed point number. Definition at line 93 of file fixed.h.

csFixed16::operator int | ( |  | ) | const`[inline]`

| Get integer part. Definition at line 89 of file fixed.h.

csFixed16& csFixed16::operator+= | ( | const csFixed16 & | x | ) | `[inline]`

| Add a fixed point number to another. Definition at line 82 of file fixed.h. References v.

csFixed16& csFixed16::operator= | ( | float | f | ) | `[inline]`

| Assign floating point number. Definition at line 41 of file fixed.h. References csQfixed16().

## Friends And Related Function Documentation

csFixed16 operator * | ( | const csFixed16 & | v1,
|  | float | v2
| ) | `[friend]`

| Multiply a fixed point number with a float, result is fixed. Definition at line 73 of file fixed.h.

csFixed16 operator- | ( | const csFixed16 & | v1,
|  | float | v2
| ) | `[friend]`

| Subtract a float number from a fixed point, result is fixed. Definition at line 64 of file fixed.h.

csFixed16 operator- | ( | float | v1,
|  | const csFixed16 & | v2
| ) | `[friend]`

| Subtract a fixed point number from a float, result is fixed. Definition at line 56 of file fixed.h.

csFixed16 operator- | ( | const csFixed16 & | v1,
|  | const csFixed16 & | v2
| ) | `[friend]`

| Subtract two fixed point numbers. Definition at line 48 of file fixed.h.

csFixed16 operator>> | ( | const csFixed16 & | v1,
|  | int | n
| ) | `[friend]`

| Shift right. Definition at line 96 of file fixed.h.

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

- csgeom/fixed.h