소스 검색

Implement vector square length.

legacy
Sam Hocevar sam 15 년 전
부모
커밋
dc45c9e426
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. +7
    -2
      src/matrix.h

+ 7
- 2
src/matrix.h 파일 보기

@@ -60,12 +60,17 @@
return ret; \
} \
\
inline float len() const \
inline T sqlen() const \
{ \
T acc = 0; \
for (int n = 0; n < elems; n++) \
acc += (*this)[n] * (*this)[n]; \
return sqrtf((float)acc); \
return acc; \
} \
\
inline float len() const \
{ \
return sqrtf((float)sqlen()); \
}

template <typename T> struct Vec2


불러오는 중...
취소
저장