Home
last modified time | relevance | path

Searched refs:x (Results 1 – 25 of 83) sorted by relevance

1234

/CTR-SDK-4.2.5/include/nn/math/
Dmath_Arithmetic.h48 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 …]
Dmath_Triangular.h244 NN_MATH_INLINE f32 NN_fAcos(f32 x) { return ::std::acosf(x); } in NN_fAcos() argument
252 NN_MATH_INLINE f32 NN_fAsin(f32 x) { return ::std::asinf(x); } in NN_fAsin() argument
260 NN_MATH_INLINE f32 NN_fAtan(f32 x) { return ::std::atanf(x); } in NN_fAtan() argument
269 NN_MATH_INLINE f32 NN_fAtan2(f32 y, f32 x) { return ::std::atan2f(y, x); } in NN_fAtan2() argument
280 AsinFIdx(f32 x) in AsinFIdx() argument
282 NN_MATH_WARNING(x <= 1.f && x >= -1.f, "AsinFIdx: Input is out of the domain."); in AsinFIdx()
283 return NN_MATH_RAD_TO_FIDX(::std::asin(x)); in AsinFIdx()
294 AcosFIdx(f32 x) in AcosFIdx() argument
296 NN_MATH_WARNING(x <= 1.f && x >= -1.f, "AcosFIdx: Input is out of the domain."); in AcosFIdx()
297 return NN_MATH_RAD_TO_FIDX(::std::acosf(x)); in AcosFIdx()
[all …]
Dmath_Vector2.h197 f32 x; // member
238 explicit VEC2(const f32* p) { x = p[0]; y = p[1]; } in VEC2()
240 VEC2(const VEC2_& v) { x = v.x; y = v.y; } in VEC2()
242 VEC2(f32 fx, f32 fy) { x = fx; y = fy; } in VEC2()
250 operator f32*() { return &x; }
253 operator const f32*() const { return &x; }
261 self_type& operator += (const self_type& rhs) { x += rhs.x; y += rhs.y; return *this; }
264 self_type& operator -= (const self_type& rhs) { x -= rhs.x; y -= rhs.y; return *this; }
267 self_type& operator *= (f32 f) { x *= f; y *= f; return *this; }
270 self_type& operator *= (const self_type& rhs) { x *= rhs.x; y *= rhs.y; return *this; }
[all …]
Dmath_Utility.h36 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 …]
Dmath_Misccellaneous.h48 NN_EXTERN_C inline s64 nnmathMultiplyAndDivide(s64 x, s32 mul, s32 div) in nnmathMultiplyAndDivide() argument
55 const s32 x_hi = (s32)(x >> 32); in nnmathMultiplyAndDivide()
56 const u32 x_lo = (u32)(x >> 0); in nnmathMultiplyAndDivide()
88 NN_EXTERN_C inline u64 nnmathMultiplyRate(u64 x, u64 rate) in nnmathMultiplyRate() argument
92 const s32 x_hi = (u32)(x >> 32); in nnmathMultiplyRate()
93 const u32 x_lo = (u32)(x >> 0); in nnmathMultiplyRate()
101 NN_EXTERN_C inline u64 nnmathMultiplyRate32(u64 x, u32 rate) in nnmathMultiplyRate32() argument
103 const s32 x_hi = (u32)(x >> 32); in nnmathMultiplyRate32()
104 const u32 x_lo = (u32)(x >> 0); in nnmathMultiplyRate32()
Dmath_Vector3.h222 f32 x; // member
261 explicit VEC3(const f32* p) { x = p[0]; y = p[1]; z = p[2]; } in VEC3()
263 VEC3(const VEC3_& v) { x = v.x; y = v.y; z = v.z; } in VEC3()
265 VEC3(f32 fx, f32 fy, f32 fz) { x = fx; y = fy; z = fz; } in VEC3()
273 operator f32*() { return &x; }
275 operator const f32*() const { return &x; }
301 self_type operator - () const { return self_type(-x, -y, -z); }
404 void Set(f32 fx, f32 fy, f32 fz) { x = fx; y = fy; z = fz; } in Set()
407 void Set(const self_type& value) { x = value.x; y = value.y; z = value.z; } in Set()
415 bool operator == (const self_type& rhs) const { return x == rhs.x && y == rhs.y && z == rhs.z; }
[all …]
/CTR-SDK-4.2.5/sources/libraries/math/
Dmath_Arithmetic.cpp351 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 …]
Dmath_Triangular.cpp351 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_()
557 f32 AtanFIdx(f32 x) in AtanFIdx() argument
559 if( x >= 0.f ) in AtanFIdx()
561 if( x > 1.f ) in AtanFIdx()
564 return 64.f - AtanFIdx_(1.f/x); in AtanFIdx()
569 return AtanFIdx_(x); in AtanFIdx()
574 if( x < -1.f ) in AtanFIdx()
[all …]
Dmath_Transform.cpp42 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-4.2.5/sources/libraries/os/
Dos_SimpleLock.cpp33 bool operator()(s32& x) in operator ()()
35 if( x > 0 ) in operator ()()
37 x = -x; in operator ()()
50 bool operator()(s32& x) in operator ()()
52 x = -x; in operator ()()
53 afterUpdate = x; in operator ()()
60 bool operator()(s32& x) in operator ()()
62 if( x < 0 ) in operator ()()
64 --x; in operator ()()
76 bool operator()(s32& x) in operator ()()
[all …]
/CTR-SDK-4.2.5/sources/libraries/cx/
Dcx_Utility.h29 inline u32 ConvertEndian( u32 x ) in ConvertEndian() argument
33 return ((x & 0xFF000000) >> 24) | in ConvertEndian()
34 ((x & 0x00FF0000) >> 8) | in ConvertEndian()
35 ((x & 0x0000FF00) << 8) | in ConvertEndian()
36 ((x & 0x000000FF) << 24); in ConvertEndian()
38 return x; in ConvertEndian()
42 inline u32 ForceConvertEndian( u32 x ) in ForceConvertEndian() argument
44 return ((x & 0xFF000000) >> 24) | in ForceConvertEndian()
45 ((x & 0x00FF0000) >> 8) | in ForceConvertEndian()
46 ((x & 0x0000FF00) << 8) | in ForceConvertEndian()
[all …]
/CTR-SDK-4.2.5/include/nn/math/inline/
Dmath_Vector3.ipp34 tmpVec.x = ( p1->y * p2->z ) - ( p1->z * p2->y );
35 tmpVec.y = ( p1->z * p2->x ) - ( p1->x * p2->z );
36 tmpVec.z = ( p1->x * p2->y ) - ( p1->y * p2->x );
38 pOut->x = tmpVec.x;
48 return p->x == 0.f && p->y == 0.f && p->z == 0.f;
54 pOut->x = (p1->x > p2->x) ? p1->x : p2->x;
64 pOut->x = (p1->x < p2->x) ? p1->x : p2->x;
77 register f32 x, y, z, mag;
79 x = p->x;
83 mag = (x * x) + (y * y) + (z * z);
[all …]
Dmath_Vector4.ipp26 pOut->x = p1->x + p2->x;
44 return p1->x * p2->x + p1->y * p2->y + p1->z * p2->z + p1->w * p2->w;
50 return p->x == 0.f && p->y == 0.f && p->z == 0.f && p->w == 0.f;
56 return p->x == 0.f && p->y == 0.f && p->z == 0.f && p->w == 1.f;
69 return p->x * p->x + p->y * p->y + p->z * p->z + p->w * p->w;
77 pOut->x = p1->x + t * (p2->x - p1->x);
88 pOut->x = (p1->x > p2->x) ? p1->x : p2->x;
98 pOut->x = p1->x * p2->x;
136 pOut->x = (p1->x < p2->x) ? p1->x : p2->x;
147 pOut->x = scale * p->x;
[all …]
Dmath_Vector2.ipp25 return p->x == 0.f && p->y == 0.f;
31 pOut->x = (p1->x > p2->x) ? p1->x : p2->x;
40 pOut->x = (p1->x < p2->x) ? p1->x : p2->x;
49 (void)VEC2Scale(pOut, p, FrSqrt(p->x * p->x + p->y * p->y));
60 f32 mag = (p->x * p->x) + (p->y * p->y);
Dmath_Quaternion.ipp30 pOut->x = q1->x + q2->x;
59 return (q1->x * q2->x + q1->y * q2->y + q1->z * q2->z + q1->w * q2->w);
73 theta = ::std::sqrtf( q->x * q->x + q->y * q->y + q->z * q->z );
81 pOut->x = scale * q->x;
96 pOut->x = t * ( q2->x - q1->x ) + q1->x;
112 scale = q->x * q->x + q->y * q->y + q->z * q->z;
122 pOut->x = scale * q->x;
139 dot = q->x * qto->x + q->y * qto->y + q->z * qto->z + q->w * qto->w;
143 pOut->x = -q->x;
171 pOut->x = sh * nAxis.x;
[all …]
Dmath_Types.ipp57 tmp.x = pV->x;
66 pOut->x = pM->f._00 * pVec->x + pM->f._01 * pVec->y + pM->f._02;
67 pOut->y = pM->f._10 * pVec->x + pM->f._11 * pVec->y + pM->f._12;
97 vTmp.x = m[0][0] * pV->x + m[0][1] * pV->y + m[0][2] * pV->z + m[0][3];
98 vTmp.y = m[1][0] * pV->x + m[1][1] * pV->y + m[1][2] * pV->z + m[1][3];
99 vTmp.z = m[2][0] * pV->x + m[2][1] * pV->y + m[2][2] * pV->z + m[2][3];
102 pOut->x = vTmp.x;
133 tmp.x = pM->f._00 * pV->x + pM->f._01 * pV->y + pM->f._02 * pV->z;
134 tmp.y = pM->f._10 * pV->x + pM->f._11 * pV->y + pM->f._12 * pV->z;
135 tmp.z = pM->f._20 * pV->x + pM->f._21 * pV->y + pM->f._22 * pV->z;
[all …]
/CTR-SDK-4.2.5/include/nn/math/ARMv6/inline/
Dmath_Quaternion.ipp57 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 …]
Dmath_Vector3.ipp44 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-4.2.5/sources/libraries/dbg/CTR/
Ddbg_DirectPrint.cpp93 nn::gx::UpdateBuffer( m_CurBuffer, byteByDot * m_BufferSize.x * m_BufferSize.y ); in Flush()
170 cursor.x += FONT_WIDTH; in PutString()
175 … if ( c == '\n' || ( autoLineFeed && str[ offset ] != '\n' && cursor.x + FONT_WIDTH >= boxWidth ) ) in PutString()
177 cursor.x = 0; in PutString()
219 if ( bufPos.y + y >= m_BufferSize.x || bufPos.y + y < 0 ) in PutChar()
223 for( s32 x = 0; x < FONT_HEIGHT; x++ ) in PutChar() local
226 if ( bufPos.x + x >= m_BufferSize.y || bufPos.x + x < 0 ) in PutChar()
230 if( printable && FONT_BITMAP[ c - ' ' ][ int( FONT_HEIGHT ) - x - 1 ][ y ] ) in PutChar()
232 PutDot( nn::math::VEC2( bufPos.x + x, bufPos.y + y ), charColorData, byteByDot ); in PutChar()
238 PutDot( nn::math::VEC2( bufPos.x + x, bufPos.y + y ), bgColorData, byteByDot ); in PutChar()
[all …]
/CTR-SDK-4.2.5/include/nn/os/
Dos_NonRecursiveCriticalSection.h35 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()
/CTR-SDK-4.2.5/include/nn/hid/CTR/
Dhid_DeviceStatus.h118 s16 x; member
147 u16 x; member
161 s16 x; member
174 f32 x; member
187 nn::math::VEC3 x;/**/
202 :x(vecx),y(vecy),z(vecz){} in Direction()
206 :x(mtx33.v[0]),y(mtx33.v[1]),z(mtx33.v[2]){} in Direction()
212 x.x,x.y,x.z, in ToMTX33()
213 y.x,y.y,y.z, in ToMTX33()
214 z.x,z.y,z.z); in ToMTX33()
/CTR-SDK-4.2.5/include/nn/dbg/
Ddbg_Logger.h83 #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-4.2.5/include/nn/font/CTR/
Dfont_CharWriter.h245 m_Scale.x = hScale; in SetScale()
255 m_Scale.x = hvScale; in SetScale()
263 f32 GetScaleH() const { return m_Scale.x; } in GetScaleH()
371 f32 x, in SetCursor() argument
375 m_CursorPos.x = x; in SetCursor()
386 f32 x, in SetCursor() argument
391 m_CursorPos.x = x; in SetCursor()
406 m_CursorPos.x += dx; in MoveCursor()
422 m_CursorPos.x += dx; in MoveCursor()
431 void SetCursorX(f32 x) { m_CursorPos.x = x; } in SetCursorX() argument
[all …]
/CTR-SDK-4.2.5/include/nn/fnd/
Dfnd_Interlocked.h88 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-4.2.5/include/nn/gx/CTR/
Dgx_MacroCommon.h22 #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

1234