summaryrefslogtreecommitdiff
path: root/src/mesa/math
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-03-01 01:50:20 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-03-01 01:50:20 +0000
commit27558a160a9fe91745728d7626995cd88f8fe339 (patch)
tree0b8cbbd49d418f5ef9f10d3d721c3d4e9e925c3d /src/mesa/math
parent4e50ab5f70582f4e362c4572b22a4c3f87c71a14 (diff)
Killed mmath.[ch]. Moved low-level functions/assembly code into imports.[ch]
Moved type conversion and interpolation macros into macros.h Updated all the files that used to include mmath.h
Diffstat (limited to 'src/mesa/math')
-rw-r--r--src/mesa/math/m_debug_norm.c7
-rw-r--r--src/mesa/math/m_matrix.c5
-rw-r--r--src/mesa/math/m_norm_tmp.h12
-rw-r--r--src/mesa/math/m_translate.c3
-rw-r--r--src/mesa/math/m_xform.c7
5 files changed, 15 insertions, 19 deletions
diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c
index 9e3f16f13c..0786ad05ee 100644
--- a/src/mesa/math/m_debug_norm.c
+++ b/src/mesa/math/m_debug_norm.c
@@ -1,10 +1,10 @@
-/* $Id: m_debug_norm.c,v 1.12 2002/12/04 14:24:44 brianp Exp $ */
+/* $Id: m_debug_norm.c,v 1.13 2003/03/01 01:50:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -31,7 +31,6 @@
#include "context.h"
#include "macros.h"
#include "imports.h"
-#include "mmath.h"
#include "m_matrix.h"
#include "m_xform.h"
diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c
index f0692ba115..95a77e6a08 100644
--- a/src/mesa/math/m_matrix.c
+++ b/src/mesa/math/m_matrix.c
@@ -1,4 +1,4 @@
-/* $Id: m_matrix.c,v 1.15 2003/01/08 16:42:47 brianp Exp $ */
+/* $Id: m_matrix.c,v 1.16 2003/03/01 01:50:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -38,7 +38,6 @@
#include "imports.h"
#include "macros.h"
#include "imports.h"
-#include "mmath.h"
#include "m_matrix.h"
@@ -606,7 +605,7 @@ _math_matrix_rotate( GLmatrix *mat,
}
if (!optimized) {
- const GLfloat mag = (GLfloat) GL_SQRT(x * x + y * y + z * z);
+ const GLfloat mag = SQRTF(x * x + y * y + z * z);
if (mag <= 1.0e-4) {
/* no rotation, leave mat as-is */
diff --git a/src/mesa/math/m_norm_tmp.h b/src/mesa/math/m_norm_tmp.h
index 55861e8ca3..2da7bbd676 100644
--- a/src/mesa/math/m_norm_tmp.h
+++ b/src/mesa/math/m_norm_tmp.h
@@ -1,10 +1,10 @@
-/* $Id: m_norm_tmp.h,v 1.12 2002/10/24 23:57:24 brianp Exp $ */
+/* $Id: m_norm_tmp.h,v 1.13 2003/03/01 01:50:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -69,7 +69,7 @@ TAG(transform_normalize_normals)( const GLmatrix *mat,
{
GLdouble len = tx*tx + ty*ty + tz*tz;
if (len > 1e-20) {
- GLdouble scale = 1.0 / GL_SQRT(len);
+ GLdouble scale = 1.0F / SQRTF(len);
out[i][0] = (GLfloat) (tx * scale);
out[i][1] = (GLfloat) (ty * scale);
out[i][2] = (GLfloat) (tz * scale);
@@ -136,7 +136,7 @@ TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat,
{
GLdouble len = tx*tx + ty*ty + tz*tz;
if (len > 1e-20) {
- GLdouble scale = 1.0 / GL_SQRT(len);
+ GLdouble scale = 1.0F / SQRTF(len);
out[i][0] = (GLfloat) (tx * scale);
out[i][1] = (GLfloat) (ty * scale);
out[i][2] = (GLfloat) (tz * scale);
@@ -323,7 +323,7 @@ TAG(normalize_normals)( const GLmatrix *mat,
const GLfloat x = from[0], y = from[1], z = from[2];
GLdouble len = x * x + y * y + z * z;
if (len > 1e-50) {
- len = 1.0 / GL_SQRT(len);
+ len = 1.0F / SQRTF(len);
out[i][0] = (GLfloat) (x * len);
out[i][1] = (GLfloat) (y * len);
out[i][2] = (GLfloat) (z * len);
diff --git a/src/mesa/math/m_translate.c b/src/mesa/math/m_translate.c
index ffd4d6a017..0c4a1b1631 100644
--- a/src/mesa/math/m_translate.c
+++ b/src/mesa/math/m_translate.c
@@ -1,4 +1,4 @@
-/* $Id: m_translate.c,v 1.10 2002/10/24 23:57:24 brianp Exp $ */
+/* $Id: m_translate.c,v 1.11 2003/03/01 01:50:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -32,7 +32,6 @@
#include "glheader.h"
#include "mtypes.h" /* GLchan hack */
#include "colormac.h"
-#include "mmath.h"
#include "m_translate.h"
diff --git a/src/mesa/math/m_xform.c b/src/mesa/math/m_xform.c
index beda08c589..a6813d29e9 100644
--- a/src/mesa/math/m_xform.c
+++ b/src/mesa/math/m_xform.c
@@ -1,10 +1,10 @@
-/* $Id: m_xform.c,v 1.18 2002/10/24 23:57:24 brianp Exp $ */
+/* $Id: m_xform.c,v 1.19 2003/03/01 01:50:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 5.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -37,7 +37,6 @@
#include "glheader.h"
#include "macros.h"
-#include "mmath.h"
#include "m_eval.h"
#include "m_matrix.h"