Nagarei / DxLibEx

DXライブラリC++化プロジェクト
Boost Software License 1.0
31 stars 3 forks source link

breaking change : change return type of dxle::cross<dxle::point_c> #90

Open yumetodo opened 8 years ago

yumetodo commented 8 years ago
template<typename T1, typename T2>
ResultType cross(const point_c<T1>& p1, const point_c<T2>& p2);

(T1 : first argumrnt type, T2 : second argumet type) result type :

  1. when T1 or T2 is not arithemtic type, result type is not-arithmetic one(T1 has high pritority).
  2. when T1 or T2 is floating point type, result type is double.
  3. when T1 or T2 is integral type, result type is integral type. sizeof(result type) is twice as many size as bigger one.
  4. In other case, result type is T1.

ref: #88