Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:36

0001 #pragma once
0002 
0003 /**
0004 sf4.h (formerly s4.h, renamed to avoid clash with S4.h on case compromised macOS)
0005 ===================================================================================
0006 
0007 **/
0008 
0009 #include <iostream>
0010 #include <iomanip>
0011 
0012 struct sf4
0013 {
0014     float x,y,z,w ;
0015     float* data() ;
0016     std::string desc() const ;
0017 };
0018 
0019 inline float* sf4::data()
0020 {
0021     return &x ;
0022 }
0023 
0024 inline std::string sf4::desc() const
0025 {
0026     std::stringstream ss ;
0027     ss
0028       << "[sf4"
0029       << " " << std::setw(10) << std::fixed << std::setprecision(3) << x
0030       << " " << std::setw(10) << std::fixed << std::setprecision(3) << y
0031       << " " << std::setw(10) << std::fixed << std::setprecision(3) << z
0032       << " " << std::setw(10) << std::fixed << std::setprecision(3) << w
0033       << "]"
0034       ;
0035     std::string str = ss.str() ;
0036     return str ;
0037 }