Files
botw/lib/sead/include/math/seadVectorCalcCommon.h
T
Léo Lam 18c60323a9 Switch to subrepos
git subrepo clone https://github.com/open-ead/sead lib/sead

subrepo:
  subdir:   "lib/sead"
  merged:   "1b66e825d"
upstream:
  origin:   "https://github.com/open-ead/sead"
  branch:   "master"
  commit:   "1b66e825d"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

git subrepo clone (merge) https://github.com/open-ead/nnheaders lib/NintendoSDK

subrepo:
  subdir:   "lib/NintendoSDK"
  merged:   "9ee21399f"
upstream:
  origin:   "https://github.com/open-ead/nnheaders"
  branch:   "master"
  commit:   "9ee21399f"
git-subrepo:
  version:  "0.4.3"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

git subrepo clone https://github.com/open-ead/agl lib/agl

subrepo:
  subdir:   "lib/agl"
  merged:   "7c063271b"
upstream:
  origin:   "https://github.com/open-ead/agl"
  branch:   "master"
  commit:   "7c063271b"
git-subrepo:
  version:  "0.4.3"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

git subrepo clone https://github.com/open-ead/EventFlow lib/EventFlow

subrepo:
  subdir:   "lib/EventFlow"
  merged:   "c35d21b34"
upstream:
  origin:   "https://github.com/open-ead/EventFlow"
  branch:   "master"
  commit:   "c35d21b34"
git-subrepo:
  version:  "0.4.3"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"
2022-03-21 21:31:42 +01:00

63 lines
1.8 KiB
C++

#pragma once
#include <math/seadMathPolicies.h>
namespace sead
{
template <typename T>
class Vector2CalcCommon
{
public:
using Base = typename Policies<T>::Vec2Base;
public:
static void add(Base& o, const Base& a, const Base& b);
static void sub(Base& o, const Base& a, const Base& b);
static void set(Base& o, const Base& v);
static void set(Base& v, T x, T y);
};
template <typename T>
class Vector3CalcCommon
{
public:
using Base = typename Policies<T>::Vec3Base;
using Mtx33 = typename Policies<T>::Mtx33Base;
using Mtx34 = typename Policies<T>::Mtx34Base;
static void add(Base& o, const Base& a, const Base& b);
static void sub(Base& o, const Base& a, const Base& b);
static void mul(Base& o, const Mtx33& m, const Base& a);
/// Apply a transformation `m` (rotation + translation) to the vector `a`.
static void mul(Base& o, const Mtx34& m, const Base& a);
static void cross(Base& o, const Base& a, const Base& b);
static T dot(const Base& a, const Base& b);
static T squaredLength(const Base& v);
static T length(const Base& v);
static bool equals(const Base& lhs, const Base& rhs, T epsilon);
static void multScalar(Base& o, const Base& v, T t);
static void multScalarAdd(Base& o, T t, const Base& a, const Base& b);
static T normalize(Base& v);
static void set(Base& o, const Base& v);
static void set(Base& v, T x, T y, T z);
};
template <typename T>
class Vector4CalcCommon
{
public:
using Base = typename Policies<T>::Vec4Base;
public:
static void set(Base& o, const Base& v);
static void set(Base& v, T x, T y, T z, T w);
};
} // namespace sead
#define SEAD_MATH_VECTOR_CALC_COMMON_H_
#include <math/seadVectorCalcCommon.hpp>
#undef SEAD_MATH_VECTOR_CALC_COMMON_H_