You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Floats are converted to string like in this example: data[2] = "float coeff[] = {" + windowedImpulseResponse[0].ToString("F7") + "f";
float.ToString() Converts a float to string, but when executed on different systems the output can be different, for example:
1.2321
1,2321
Suggested Solution:
What I did to fix this little inconvenence was to define the culture of the conversion ("en-US", that uses "." as decimal separator): CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
and then convert all the floats to string specifying the culture to be used, for example: data[2] = "float coeff[] = {" + windowedImpulseResponse[0].ToString("F7", culture) + "f";
By doing this, the resulting export is as expected:
P.S.:
Thanks for sharing these projects and for the very very clear explanations in the videos.
I am not very familiar with git, so I opened this issue instead of contributing directly.
The text was updated successfully, but these errors were encountered:
Hello, I found that Coefficients, Time Domain and Frequency Domain Data exports are broken for FIRWinSyncDesign.
Problem:
In some countries, a comma "," is used instead of the dot "." as a decimal separator, so the exported list of coefficients is unusable:
The problem is in frmMain.cs.
Floats are converted to string like in this example:
data[2] = "float coeff[] = {" + windowedImpulseResponse[0].ToString("F7") + "f";
float.ToString()
Converts a float to string, but when executed on different systems the output can be different, for example:Suggested Solution:
What I did to fix this little inconvenence was to define the culture of the conversion ("en-US", that uses "." as decimal separator):
CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
and then convert all the floats to string specifying the culture to be used, for example:
data[2] = "float coeff[] = {" + windowedImpulseResponse[0].ToString("F7", culture) + "f";
By doing this, the resulting export is as expected:
P.S.:
Thanks for sharing these projects and for the very very clear explanations in the videos.
I am not very familiar with git, so I opened this issue instead of contributing directly.
The text was updated successfully, but these errors were encountered: