diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2025-02-21 16:03:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-21 17:03:51 -0700 |
| commit | 8c6ae625aef6d07741cd8925f422f43ae24b198c (patch) | |
| tree | 741fafdf5cf11006a23a9019451082c269fe4922 /lib/ultralib/src/gu/mtxcatf.c | |
| parent | f013a028f42a1b11134bc5f22f28e9f48236b6f0 (diff) | |
Ultralib Update (#233)
* git subrepo pull (merge) lib/ultralib
subrepo:
subdir: "lib/ultralib"
merged: "74f0eee"
upstream:
origin: "git@github.com:decompals/ultralib.git"
branch: "main"
commit: "2717d45"
git-subrepo:
version: "0.4.9"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "cce3d93"
* New ultralib fixes
* Update some includes in tools
* git subrepo commit (merge) lib/ultralib
subrepo:
subdir: "lib/ultralib"
merged: "3a702eaf"
upstream:
origin: "git@github.com:decompals/ultralib.git"
branch: "main"
commit: "48f9f908"
git-subrepo:
version: "0.4.9"
origin: "git@github.com:ingydotnet/git-subrepo.git"
commit: "ea10886"
* Update warnings file
Diffstat (limited to 'lib/ultralib/src/gu/mtxcatf.c')
| -rw-r--r-- | lib/ultralib/src/gu/mtxcatf.c | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/lib/ultralib/src/gu/mtxcatf.c b/lib/ultralib/src/gu/mtxcatf.c index 6572e0f..567e46f 100644 --- a/lib/ultralib/src/gu/mtxcatf.c +++ b/lib/ultralib/src/gu/mtxcatf.c @@ -1,63 +1,63 @@ -
-/*
- * Copyright 1995, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- *
- * UNPUBLISHED -- Rights reserved under the copyright laws of the United
- * States. Use of a copyright notice is precautionary only and does not
- * imply publication or disclosure.
- *
- * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
- * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
- * in similar or successor clauses in the FAR, or the DOD or NASA FAR
- * Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
- * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
- *
- * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
- * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
- * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
- * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
- * GRAPHICS, INC.
- *
- */
-
-/*
- * File: mtxcatf.c
- * Creator: hsa@sgi.com
- * Create Date: Thu Nov 2 13:03:02 PST 1995
- *
- */
-
-#include "guint.h"
-
-void guMtxCatF(float mf[4][4], float nf[4][4], float res[4][4])
-{
- int i, j, k;
- float temp[4][4];
-
- for (i=0; i<4; i++) {
- for (j=0; j<4; j++) {
- temp[i][j] = 0.0;
- for (k=0; k<4; k++) {
- temp[i][j] += mf[i][k] * nf[k][j];
- }
- }
- }
-
- /* make sure we handle case where result is an input */
- for (i=0; i<4; i++) {
- for (j=0; j<4; j++) {
- res[i][j] = temp[i][j];
- }
- }
-}
-
-void guMtxXFMF(float mf[4][4], float x, float y, float z, float *ox, float *oy, float *oz)
-{
- *ox = mf[0][0]*x + mf[1][0]*y + mf[2][0]*z + mf[3][0];
- *oy = mf[0][1]*x + mf[1][1]*y + mf[2][1]*z + mf[3][1];
- *oz = mf[0][2]*x + mf[1][2]*y + mf[2][2]*z + mf[3][2];
-}
-
+ +/* + * Copyright 1995, Silicon Graphics, Inc. + * ALL RIGHTS RESERVED + * + * UNPUBLISHED -- Rights reserved under the copyright laws of the United + * States. Use of a copyright notice is precautionary only and does not + * imply publication or disclosure. + * + * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND: + * Use, duplication or disclosure by the Government is subject to restrictions + * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights + * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or + * in similar or successor clauses in the FAR, or the DOD or NASA FAR + * Supplement. Contractor/manufacturer is Silicon Graphics, Inc., + * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311. + * + * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY + * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION, + * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY + * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON + * GRAPHICS, INC. + * + */ + +/* + * File: mtxcatf.c + * Creator: hsa@sgi.com + * Create Date: Thu Nov 2 13:03:02 PST 1995 + * + */ + +#include "guint.h" + +void guMtxCatF(float mf[4][4], float nf[4][4], float res[4][4]) +{ + int i, j, k; + float temp[4][4]; + + for (i=0; i<4; i++) { + for (j=0; j<4; j++) { + temp[i][j] = 0.0; + for (k=0; k<4; k++) { + temp[i][j] += mf[i][k] * nf[k][j]; + } + } + } + + /* make sure we handle case where result is an input */ + for (i=0; i<4; i++) { + for (j=0; j<4; j++) { + res[i][j] = temp[i][j]; + } + } +} + +void guMtxXFMF(float mf[4][4], float x, float y, float z, float *ox, float *oy, float *oz) +{ + *ox = mf[0][0]*x + mf[1][0]*y + mf[2][0]*z + mf[3][0]; + *oy = mf[0][1]*x + mf[1][1]*y + mf[2][1]*z + mf[3][1]; + *oz = mf[0][2]*x + mf[1][2]*y + mf[2][2]*z + mf[3][2]; +} + |
