| /CTR-SDK-1.3.0/CTR_SDK/include/nn/math/ |
| D | math_Arithmetic.h | 48 F32AsU32(f32 x) in F32AsU32() argument 50 return *reinterpret_cast<u32*>(&x); in F32AsU32() 63 U32AsF32(u32 x) in U32AsF32() argument 65 return *reinterpret_cast<f32*>(&x); in U32AsF32() 129 FAbs(f32 x) in FAbs() argument 133 ret = ::std::fabsf(x); in FAbs() 148 FNAbs(f32 x) in FNAbs() argument 152 ret = - FAbs(x); in FNAbs() 178 f32 FExp(f32 x); 179 f32 FLog(f32 x); [all …]
|
| D | math_Triangular.h | 229 inline f32 NN_fAcos(f32 x) { return ::std::acosf(x); } in NN_fAcos() argument 230 inline f32 NN_fAsin(f32 x) { return ::std::asinf(x); } in NN_fAsin() argument 231 inline f32 NN_fAtan(f32 x) { return ::std::atanf(x); } in NN_fAtan() argument 232 inline f32 NN_fAtan2(f32 y, f32 x) { return ::std::atan2f(y, x); } in NN_fAtan2() argument 243 AsinFIdx(f32 x) in AsinFIdx() argument 245 NN_MATH_WARNING(x <= 1.f && x >= -1.f, "AsinFIdx: Input is out of the domain."); in AsinFIdx() 246 return NN_MATH_RAD_TO_FIDX(::std::asin(x)); in AsinFIdx() 257 AcosFIdx(f32 x) in AcosFIdx() argument 259 NN_MATH_WARNING(x <= 1.f && x >= -1.f, "AcosFIdx: Input is out of the domain."); in AcosFIdx() 260 return NN_MATH_RAD_TO_FIDX(::std::acosf(x)); in AcosFIdx() [all …]
|
| D | math_Vector2.h | 47 f32 x; member 78 VEC2(const f32* p) { x = p[0]; y = p[1]; } in VEC2() 80 VEC2(const VEC2_& v) { x = v.x; y = v.y; } in VEC2() 82 VEC2(f32 fx, f32 fy) { x = fx; y = fy; } in VEC2() 90 operator f32*() { return &x; } 93 operator const f32*() const { return &x; } 99 self_type& operator += (const self_type& rhs) { x += rhs.x; y += rhs.y; return *this; } 100 self_type& operator -= (const self_type& rhs) { x -= rhs.x; y -= rhs.y; return *this; } 101 self_type& operator *= (const self_type& rhs) { x *= rhs.x; y *= rhs.y; return *this; } 102 self_type& operator *= (f32 f) { x *= f; y *= f; return *this; } [all …]
|
| D | math_Utility.h | 36 inline T Abs(T x) in Abs() argument 38 return (x >= 0) ? x: -x; in Abs() 187 inline T Clamp(T x, T low, T high) in Clamp() argument 189 return (x >= high) ? high : ((x <= low) ? low: x); in Clamp() 202 inline T RoundUp(T x, u32 base) in RoundUp() argument 204 return static_cast<T>( (x + (base - 1)) & ~(base - 1) ); in RoundUp() 216 inline void* RoundUp(void* x, u32 base) in RoundUp() argument 218 return reinterpret_cast<void*>( RoundUp(reinterpret_cast<uptr>(x), base) ); in RoundUp() 230 inline const void* RoundUp(const void* x, u32 base) in RoundUp() argument 232 return reinterpret_cast<const void*>( RoundUp(reinterpret_cast<uptr>(x), base) ); in RoundUp() [all …]
|
| D | math_Vector3.h | 60 f32 x; member 90 VEC3(const f32* p) { x = p[0]; y = p[1]; z = p[2]; } in VEC3() 92 VEC3(const VEC3_& v) { x = v.x; y = v.y; z = v.z; } in VEC3() 94 VEC3(f32 fx, f32 fy, f32 fz) { x = fx; y = fy; z = fz; } in VEC3() 102 operator f32*() { return &x; } 104 operator const f32*() const { return &x; } 118 self_type operator - () const { return self_type(-x, -y, -z); } 214 void Set(f32 fx, f32 fy, f32 fz) { x = fx; y = fy; z = fz; } in Set() 217 void Set(const self_type& value) { x = value.x; y = value.y; z = value.z; } in Set() 225 bool operator == (const self_type& rhs) const { return x == rhs.x && y == rhs.y && z == rhs.z; } [all …]
|
| /CTR-SDK-1.3.0/CTR_SDK/sources/libraries/math/ |
| D | math_Arithmetic.cpp | 351 FExpLn2(f32 x) in FExpLn2() argument 359 fidx = (x + F_LN2) * (32 / (2 * F_LN2)); in FExpLn2() 379 FLog1_2(f32 x) in FLog1_2() argument 387 fidx = (x - 1) * 256.f; // 0 <= fidx < 256 in FLog1_2() 416 FExp(f32 x) in FExp() argument 434 k = F32ToS16(F_INVLN2 * x); in FExp() 436 xn = x - kf * F_LN2; in FExp() 467 FLog(f32 x) in FLog() argument 483 k = FGetExpPart(x); in FLog() 484 xn = FGetMantPart(x); in FLog() [all …]
|
| D | math_Triangular.cpp | 351 f32 AtanFIdx_(f32 x) in AtanFIdx_() argument 358 x *= 32.f; in AtanFIdx_() 359 idx = F32ToU16(x); in AtanFIdx_() 360 r = x - U16ToF32(idx); in AtanFIdx_() 547 f32 AtanFIdx(f32 x) in AtanFIdx() argument 549 if( x >= 0.f ) in AtanFIdx() 551 if( x > 1.f ) in AtanFIdx() 554 return 64.f - AtanFIdx_(1.f/x); in AtanFIdx() 559 return AtanFIdx_(x); in AtanFIdx() 564 if( x < -1.f ) in AtanFIdx() [all …]
|
| D | math_Transform.cpp | 42 NN_MATH_REPORT("Scale <%f, %f>\n", scale.x, scale.y); in Report() 43 NN_MATH_REPORT("Rotate <%f, %f>\n", rotate.x, rotate.y); in Report() 44 NN_MATH_REPORT("Translate<%f, %f>\n", translate.x, translate.y); in Report() 65 NN_MATH_REPORT("Scale <%f, %f, %f>\n", scale.x, scale.y, scale.z); in Report() 66 NN_MATH_REPORT("Rotate <%f, %f, %f>\n", rotate.x, rotate.y, rotate.z); in Report() 67 NN_MATH_REPORT("Translate<%f, %f, %f>\n", translate.x, translate.y, translate.z); in Report()
|
| /CTR-SDK-1.3.0/CTR_SDK/include/nn/math/inline/ |
| D | math_Vector3.ipp | 40 return p->x == 0.f && p->y == 0.f && p->z == 0.f; 55 pOut->x = (p1->x > p2->x) ? p1->x : p2->x; 76 pOut->x = (p1->x < p2->x) ? p1->x : p2->x; 103 tmpVec.x = ( p1->y * p2->z ) - ( p1->z * p2->y ); 104 tmpVec.y = ( p1->z * p2->x ) - ( p1->x * p2->z ); 105 tmpVec.z = ( p1->x * p2->y ) - ( p1->y * p2->x ); 107 pOut->x = tmpVec.x; 131 register f32 x, y, z, mag; 133 x = p->x; 137 mag = (x * x) + (y * y) + (z * z); [all …]
|
| D | math_Vector2.ipp | 38 return p->x == 0.f && p->y == 0.f; 53 pOut->x = (p1->x > p2->x) ? p1->x : p2->x; 72 pOut->x = (p1->x < p2->x) ? p1->x : p2->x; 90 (void)VEC2Scale(pOut, p, FrSqrt(p->x * p->x + p->y * p->y)); 111 f32 mag = (p->x * p->x) + (p->y * p->y);
|
| D | math_Vector4.ipp | 37 return p->x == 0.f && p->y == 0.f && p->z == 0.f && p->w == 0.f; 50 return p->x == 0.f && p->y == 0.f && p->z == 0.f && p->w == 1.f; 65 pOut->x = p1->x + p2->x; 85 pOut->x = p1->x - p2->x; 105 pOut->x = p1->x * p2->x; 124 pOut->x = scale * p->x; 146 pOut->x = p1->x + t * (p2->x - p1->x); 165 return p1->x * p2->x + p1->y * p2->y + p1->z * p2->z + p1->w * p2->w; 179 return p->x * p->x + p->y * p->y + p->z * p->z + p->w * p->w; 270 pOut->x = (p1->x > p2->x) ? p1->x : p2->x; [all …]
|
| D | math_Types.ipp | 67 tmp.x = pV->x; 76 pOut->x = pM->f._00 * pVec->x + pM->f._01 * pVec->y + pM->f._02; 77 pOut->y = pM->f._10 * pVec->x + pM->f._11 * pVec->y + pM->f._12; 118 vTmp.x = m[0][0] * pV->x + m[0][1] * pV->y + m[0][2] * pV->z + m[0][3]; 119 vTmp.y = m[1][0] * pV->x + m[1][1] * pV->y + m[1][2] * pV->z + m[1][3]; 120 vTmp.z = m[2][0] * pV->x + m[2][1] * pV->y + m[2][2] * pV->z + m[2][3]; 123 pOut->x = vTmp.x; 175 tmp.x = pM->f._00 * pV->x + pM->f._01 * pV->y + pM->f._02 * pV->z; 176 tmp.y = pM->f._10 * pV->x + pM->f._11 * pV->y + pM->f._12 * pV->z; 177 tmp.z = pM->f._20 * pV->x + pM->f._21 * pV->y + pM->f._22 * pV->z; [all …]
|
| D | math_Quaternion.ipp | 45 pOut->x = q1->x + q2->x; 71 pOut->x = q1->x - q2->x; 120 return (q1->x * q2->x + q1->y * q2->y + q1->z * q2->z + q1->w * q2->w); 140 pOut->x = q->x * scale; 170 theta = ::std::sqrtf( q->x * q->x + q->y * q->y + q->z * q->z ); 178 pOut->x = scale * q->x; 204 scale = q->x * q->x + q->y * q->y + q->z * q->z; 214 pOut->x = scale * q->x; 240 pOut->x = t * ( q2->x - q1->x ) + q1->x; 268 cos_th = q1->x * q2->x + q1->y * q2->y + q1->z * q2->z + q1->w * q2->w; [all …]
|
| /CTR-SDK-1.3.0/CTR_SDK/include/nn/math/ARMv6/inline/ |
| D | math_Quaternion.ipp | 57 pDst->w = q1->w * q2->w - q1->x * q2->x - q1->y * q2->y - q1->z * q2->z; 58 pDst->x = q1->w * q2->x + q1->x * q2->w + q1->y * q2->z - q1->z * q2->y; 59 pDst->y = q1->w * q2->y + q1->y * q2->w + q1->z * q2->x - q1->x * q2->z; 60 pDst->z = q1->w * q2->z + q1->z * q2->w + q1->x * q2->y - q1->y * q2->x; 72 register f32 x, y, z, w; 76 q1x = q1->x; 81 q2x = q2->x; 86 x = q1w * q2x + q1x * q2w + q1y * q2z - q1z * q2y; 91 pOut->x = x; 117 mag = (q->x * q->x) + (q->y * q->y) + (q->z * q->z) + (q->w * q->w); [all …]
|
| D | math_Vector3.ipp | 44 f32 mag = (p->x * p->x) + (p->y * p->y) + (p->z * p->z); 50 pOut->x = p->x * mag; 64 register f32 x, y, z, mag; 66 x = p->x; 70 mag = (x * x) + (y * y) + (z * z); 76 x *= mag; 80 pOut->x = x;
|
| /CTR-SDK-1.3.0/CTR_SDK/include/nn/cec/CTR/ |
| D | cec_Api.h | 31 #define NWM_BE2LE16(x) ((static_cast<u16>( \ argument 32 (((x) & 0xFF00UL) >> 8UL) | \ 33 (((x) & 0x00FFUL) << 8UL))) ) 34 #define NWM_BE2LE32(x) ((static_cast<u32>( \ argument 35 (((x) & 0xFF000000UL) >> 24UL) | \ 36 (((x) & 0x00FF0000UL) >> 8UL) | \ 37 (((x) & 0x0000FF00UL) << 8UL) | \ 38 (((x) & 0x000000FFUL) << 24UL))) ) 39 #define NWM_LE2BE16(x) NWM_BE2LE16(x) argument 40 #define NWM_LE2BE32(x) NWM_BE2LE32(x) argument
|
| /CTR-SDK-1.3.0/CTR_SDK/include/nn/os/ |
| D | os_NonRecursiveCriticalSection.h | 35 bool operator()(s32& x) in operator() 37 if( x > 0 ) in operator() 39 x = -x; in operator() 52 bool operator()(s32& x) in operator() 54 x = -x; in operator() 55 afterUpdate = x; in operator()
|
| D | os_InterCoreCriticalSection.h | 48 bool operator()(s32& x) in operator() 50 if( x > 0 ) in operator() 52 x = -x; in operator() 65 bool operator()(s32& x) in operator() 67 x = -x; in operator() 68 afterUpdate = x; in operator()
|
| D | os_CriticalSection.h | 60 bool operator()(s32& x) in operator() 62 if( x > 0 ) in operator() 64 x = -x; in operator() 77 bool operator()(s32& x) in operator() 79 x = -x; in operator() 80 afterUpdate = x; in operator()
|
| D | os_LightSemaphore.h | 58 bool operator()(s32& x) in operator() 60 if( x > 0 ) in operator() 62 --x; in operator() 77 bool operator()(s32& x) in operator() 79 beforeUpdate = x; in operator() 81 if( x > max - value ) in operator() 83 x = max; in operator() 87 x += value; in operator()
|
| /CTR-SDK-1.3.0/CTR_SDK/include/nn/hid/CTR/ |
| D | hid_DeviceStatus.h | 94 s16 x; member 123 u16 x; member 137 s16 x; member 150 f32 x; member 163 nn::math::VEC3 x;/**/ 178 :x(vecx),y(vecy),z(vecz){} in Direction() 182 :x(mtx33.v[0]),y(mtx33.v[1]),z(mtx33.v[2]){} in Direction() 188 x.x,x.y,x.z, in ToMTX33() 189 y.x,y.y,y.z, in ToMTX33() 190 z.x,z.y,z.z); in ToMTX33()
|
| /CTR-SDK-1.3.0/CTR_SDK/include/nn/dbg/ |
| D | dbg_Logger.h | 83 #define NN_LOG_NAMESPACE(x) ::nn::dbg::detail::Logger::SetNameSpace(x) argument 92 #define NN_LOG_SIGNATURE(x) ::nn::dbg::detail::Logger::SetSignature(x) argument 101 #define NN_LOG_LONGPATH(x) ::nn::dbg::detail::Logger::SetLongpath(x) argument 103 #define NN_LOG_SET_UPPER_LOG_LEVEL(x) ::nn::dbg::detail::Logger::SetUpperLevel(x) argument 104 #define NN_LOG_SET_LOWER_LOG_LEVEL(x) ::nn::dbg::detail::Logger::SetLowerLevel(x) argument 105 #define NN_LOG_SET_LOG_LEVEL(x) NN_LOG_SET_LOWER_LOG_LEVEL(x) argument
|
| /CTR-SDK-1.3.0/CTR_SDK/include/nn/fnd/ |
| D | fnd_Interlocked.h | 88 bool operator()(T& x) { x = m_converter(x); return true; } 96 bool operator()(T& x) { x op m_operand; return true; } \ 112 bool operator()(T& x) { result = preop x postop; return true; } \ 127 bool operator()(T& x) 129 m_result = x; 130 if (x == m_comparand) 132 x = m_value; 154 …typename StorageSelecter<T>::Type x = reinterpret_cast<const volatile typename StorageSelecter<T>:… 155 return reinterpret_cast<T&>(x); 159 …typename StorageSelecter<T>::Type x = reinterpret_cast<const volatile typename StorageSelecter<T>:… [all …]
|
| /CTR-SDK-1.3.0/CTR_SDK/include/nn/font/CTR/ |
| D | font_CharWriter.h | 246 m_Scale.x = hScale; in SetScale() 256 m_Scale.x = hvScale; in SetScale() 264 f32 GetScaleH() const { return m_Scale.x; } in GetScaleH() 372 f32 x, in SetCursor() argument 376 m_CursorPos.x = x; in SetCursor() 387 f32 x, in SetCursor() argument 392 m_CursorPos.x = x; in SetCursor() 407 m_CursorPos.x += dx; in MoveCursor() 423 m_CursorPos.x += dx; in MoveCursor() 432 void SetCursorX(f32 x) { m_CursorPos.x = x; } in SetCursorX() argument [all …]
|
| /CTR-SDK-1.3.0/CTR_SDK/include/nn/gx/CTR/ |
| D | gx_MacroCommon.h | 22 #define CMD_PADDING_NAME2( x, name ) u32 padding_##name : x argument 23 #define CMD_PADDING_NAME1( x, name ) CMD_PADDING_NAME2( x, name ) argument 24 #define CMD_PADDING( x ) CMD_PADDING_NAME1( x, __LINE__ ) argument
|