/*****************************************************************************
** This is part of the CTSim program
/*****************************************************************************
** This is part of the CTSim program
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
*
* SYNOPSIS
* rotate2d (x, y, n, angle)
*
* SYNOPSIS
* rotate2d (x, y, n, angle)
- * double x[], y[] Array of points
- * int n Number of points in array
- * double angle Rotation angle (counter-clockwise)
+ * double x[], y[] Array of points
+ * int n Number of points in array
+ * double angle Rotation angle (counter-clockwise)
rotate2d (double x[], double y[], int n, double angle)
{
double cos_theta = cos (angle);
rotate2d (double x[], double y[], int n, double angle)
{
double cos_theta = cos (angle);
*
* SYNOPSIS
* xlat2d (x, y, n, xoffset, yoffset)
*
* SYNOPSIS
* xlat2d (x, y, n, xoffset, yoffset)
- * double x[], y[] Array of points
- * int n Number of points in array
- * double xoffset, yoffset Offset to translate points by
+ * double x[], y[] Array of points
+ * int n Number of points in array
+ * double xoffset, yoffset Offset to translate points by
xlat2d (double x[], double y[], int n, double xoffset, double yoffset)
{
for (int i = 0; i < n; i++) {
xlat2d (double x[], double y[], int n, double xoffset, double yoffset)
{
for (int i = 0; i < n; i++) {
*
* SYNOPSIS
* scale2d (x, y, n, xoffset, yoffset)
*
* SYNOPSIS
* scale2d (x, y, n, xoffset, yoffset)
- * double x[], y[] Array of points
- * int n Number of points in array
- * double xfact, yfact x & y scaling factors
+ * double x[], y[] Array of points
+ * int n Number of points in array
+ * double xfact, yfact x & y scaling factors
scale2d (double x[], double y[], int n, double xfact, double yfact)
{
for (int i = 0; i < n; i++) {
scale2d (double x[], double y[], int n, double xfact, double yfact)
{
for (int i = 0; i < n; i++) {
-
- for (int row = 0; row < 3; row++)
- for (int col = 0; col < 3; col++)
- result[row][col] = temp[row][col];
+ }
+ copy_mtx2 (result, temp);
xform_mtx2 (const GRFMTX_2D m, double& x, double& y)
{
double xt = x * m[0][0] + y * m[1][0] + m[2][0];
xform_mtx2 (const GRFMTX_2D m, double& x, double& y)
{
double xt = x * m[0][0] + y * m[1][0] + m[2][0];