Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Functions

NameDescription
GeoAlign(T *, s32)

Align the supplied pointer to the supplied boundary.

GeoAlign(T, s32)

Align the supplied value to the supplied boundary.

GeoIsAligned(T, s32)

Check if the supplied value is aligned to the given alignment.

GeoIsAligned(T *, s32)

Check if the supplied address is aligned to the given alignment.

numeric_cast(Y)

Safer static cast that 'protects' against underflow/overflow.

Defines

NameDescription
GEO_ALIGN GEO_PRE_ALIGN(alignment) toAlign GEO_POST_ALIGN(alignment)

A helper macro for the two above.

GEO_ALIGN_OF 4

Reports the alignment of the object.

GEO_CONTROLLED_INLINE inline

To be put in front of functions that should optionally be inlined, depending on the definition of GEO_FAST_INPUT_LIGHTING.

GEO_FAST_INPUT_LIGHTING 0

Indicates whether additional functions should be force inlined.

GEO_FORCE_INLINE __forceinline

To be put in front of functions that should always be inlined.

GEO_PLATFORM_VARIABLE_PACK

Defined if the platform/compiler allows the programmer to change the default packing of structures.

GEO_POST_ALIGN

To be put after types/variables to be aligned.

GEO_PRE_ALIGN

To be put infront of types/variables to be aligned.


Anchor
a7fb6fe54b3fb6137eec0f45181960e02
a7fb6fe54b3fb6137eec0f45181960e02

T* Geo::GeoAlign

...

public: T * GeoAlign
(
    T * ptr,
    s32 align
)

...

Align the supplied pointer to the supplied boundary.


Anchor
a01ef9afdaa0f1efe88976ae701d93bb2
a01ef9afdaa0f1efe88976ae701d93bb2

T Geo::GeoAlign

...

public: T GeoAlign
(
    T value,
    s32 align
)

...

Align the supplied value to the supplied boundary.


Anchor
ac3306358bd985cb17f8d3eba069893bb
ac3306358bd985cb17f8d3eba069893bb

bool Geo::GeoIsAligned

...

public: bool GeoIsAligned
(
    T value,
    s32 align
)

...

Check if the supplied value is aligned to the given alignment.

Parameters
[in]value

Value to check alignment of.

[in]align

Must be a power of two.


Anchor
a82fccacf4861983769116aaca01b2e2d
a82fccacf4861983769116aaca01b2e2d

bool Geo::GeoIsAligned

...

public: bool GeoIsAligned
(
    T * ptr,
    s32 align
)

...

Check if the supplied address is aligned to the given alignment.

Parameters
[in]ptr

Address to check. A NULL address will be classified as aligned regardless of alignment.

[in]align

Must be a power of two.


Anchor
a8181b562f993d27ed5a14462c45ecd39
a8181b562f993d27ed5a14462c45ecd39

T Geo::numeric_cast

...

public: T numeric_cast
(
    Y numval
)

...

Safer static cast that 'protects' against underflow/overflow.

Template Parameters
T

Type being cast to

Y

Type being cast from

Parameters
numval

Numeric value being cast

Returns

numval as type Y, asserts if the range of Y is exceeded