Adds Defaults to UDim, Vector2, Vector3, UVector2

Create issue
Issue #415 resolved
Former user created an issue

Automatic migration. Original reporter: "avengre"

Adds some defaults (ZERO, POSITIVE_X, NEGATIVE_X, etc) to

UDim, UVector2, Vector2, Vector3

Reproducibility: N/A

Comments (5)

  1. Martin Preisler

    Unfortunately this can't be done without major problems with the new template math classes, so I am closing this as won't fix.

  2. Martin Preisler

    Avengre has a point that it's a pain to write it over and over.

    The suggested pattern is as such: add commonly used static const constants with the following names: namespace CEGUI { static const Vector2f Vector2f_ZERO; }

    and some C++ file to contain these of course, probably Vector2.cpp

    EDIT: The final approach is to use methods and pass by copy to avoid linking duplications (all the methods are marked for inlining).

  3. Log in to comment