csFixed24 Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Friends
csFixed24 Class Reference
Geometry utilities

Encapsulation of a 8.24 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.
csFixed24 & | operator+= (const csFixed24 &x)
| Add a fixed point number to another.
csFixed24 & | operator= (float f)
| Assign floating point number.
## Friends
csFixed24 | operator* (const csFixed24 &v1, float v2)
| Multiply a fixed point number with a float, result is fixed.
csFixed24 | operator- (const csFixed24 &v1, const csFixed24 &v2)
| Subtract two fixed point numbers.
csFixed24 | operator- (float v1, const csFixed24 &v2)
| Subtract a fixed point number from a float, result is fixed.
csFixed24 | operator- (const csFixed24 &v1, float v2)
| Subtract a float number from a fixed point, result is fixed.

## Detailed Description

Encapsulation of a 8.24 fixed-point number.

Todo:
  More operators.

Definition at line 120 of file fixed.h.

## Member Function Documentation

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

Get "raw" fixed point number.

Definition at line 177 of file fixed.h.

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

Get integer part.

Definition at line 173 of file fixed.h.

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

Add a fixed point number to another.

Definition at line 166 of file fixed.h.

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

Assign floating point number.

Definition at line 125 of file fixed.h.

## Friends And Related Function Documentation

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

Multiply a fixed point number with a float, result is fixed.

Definition at line 157 of file fixed.h.

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

Subtract two fixed point numbers.

Definition at line 132 of file fixed.h.

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

Subtract a fixed point number from a float, result is fixed.

Definition at line 140 of file fixed.h.

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

Subtract a float number from a fixed point, result is fixed.

Definition at line 148 of file fixed.h.

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

- csgeom/fixed.h