//
// Written by Curtis Olson, started December 2003.
//
-// Copyright (C) 2003 Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2003 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
#define _SG_VASI_HXX
-#ifndef __cplusplus
+#ifndef __cplusplus
# error This library requires C++
-#endif
+#endif
#include <simgear/compiler.h>
if ( angle_deg < ref - trans ) {
color = 0.0;
} else if ( angle_deg < ref + trans ) {
- color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+ color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
} else {
color = 1.0;
}
if ( angle_deg < ref - trans ) {
color = 0.0;
} else if ( angle_deg < ref + trans ) {
- color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+ color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
} else {
color = 1.0;
}
if ( angle_deg < ref - trans ) {
color = 0.0;
} else if ( angle_deg < ref + trans ) {
- color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+ color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
} else {
color = 1.0;
}
if ( angle_deg < ref - trans ) {
color = 0.0;
} else if ( angle_deg < ref + trans ) {
- color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+ color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
} else {
color = 1.0;
}
if ( angle_deg < ref - trans ) {
color = 0.0;
} else if ( angle_deg < ref + trans ) {
- color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+ color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
} else {
color = 1.0;
}
if ( angle_deg < ref - trans ) {
color = 0.0;
} else if ( angle_deg < ref + trans ) {
- color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+ color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
} else {
color = 1.0;
}