diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-03-02 18:34:34 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-03-02 18:34:34 +0000 |
commit | f9b9cd71d68528171a4253be027b7c182fc63ad8 (patch) | |
tree | 8e1fc6e910840d4621748e8f99ef3d6e5cbf752f /src/mesa/main | |
parent | 9d823a35134f47b9b0ed2493ff0fe49d9571c10f (diff) |
minor clean-up
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/points.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index fb1ab0a446..66b38df3f2 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -1,10 +1,10 @@ -/* $Id: points.c,v 1.6 1999/12/10 15:38:08 brianp Exp $ */ +/* $Id: points.c,v 1.7 2000/03/02 18:34:34 brianp Exp $ */ /* * Mesa 3-D graphics library * Version: 3.3 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2000 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"), @@ -709,15 +709,14 @@ static void dist3(GLfloat *out, GLuint first, GLuint last, const GLcontext *ctx, const GLvector4f *v) { GLuint stride = v->stride; - GLfloat *p = VEC_ELT(v, GLfloat, first); + const GLfloat *p = VEC_ELT(v, GLfloat, first); GLuint i; - for (i = first ; i <= last ; i++, STRIDE_F(p, stride) ) - { + for (i = first ; i <= last ; i++, STRIDE_F(p, stride) ) { GLfloat dist = GL_SQRT(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]); - out[i] = 1/(ctx->Point.Params[0]+ - dist * (ctx->Point.Params[1] + - dist * ctx->Point.Params[2])); + out[i] = 1.0F / (ctx->Point.Params[0] + + dist * (ctx->Point.Params[1] + + dist * ctx->Point.Params[2])); } } @@ -725,15 +724,14 @@ static void dist2(GLfloat *out, GLuint first, GLuint last, const GLcontext *ctx, const GLvector4f *v) { GLuint stride = v->stride; - GLfloat *p = VEC_ELT(v, GLfloat, first); + const GLfloat *p = VEC_ELT(v, GLfloat, first); GLuint i; - for (i = first ; i <= last ; i++, STRIDE_F(p, stride) ) - { + for (i = first ; i <= last ; i++, STRIDE_F(p, stride) ) { GLfloat dist = GL_SQRT(p[0]*p[0]+p[1]*p[1]); - out[i] = 1/(ctx->Point.Params[0]+ - dist * (ctx->Point.Params[1] + - dist * ctx->Point.Params[2])); + out[i] = 1.0F / (ctx->Point.Params[0] + + dist * (ctx->Point.Params[1] + + dist * ctx->Point.Params[2])); } } |