Commit Graph

308 Commits

Author SHA1 Message Date
Glenn Maynard beef1efa87 partial ARRAYSIZE -> ARRAYLEN 2006-08-08 18:57:00 +00:00
Glenn Maynard 47e601cd4a unrelated comment 2006-08-02 04:21:54 +00:00
Steve Checkoway a07e194cf1 Revert. Fixes Linux build. 2006-07-18 05:51:37 +00:00
Jason Felds 366c3440d4 Fix VC8 macro redef warning. (more to come) 2006-07-18 03:56:37 +00:00
Steve Checkoway d2429cb63b Fix standard deviation calculation. This could probably be done using accumulate, multiplies, minus, bind2nd, distance, and compose2, but that's probably less clear.
Something like
float fMean = calc_mean( pStart, pEnd );
return sqrtf( accumulate(pStart, pEnd, 0.0f, compose2(multiplies<float>(), bind2nd(minus<float>(), fMean), bind2nd(minus<float>(), fMean))) / distance(pStart, pEnd) );
These are easily templated too, if necessary.
2006-07-08 07:49:42 +00:00
Steve Checkoway d2d24ceb4b Cleanup. 2006-06-26 11:36:10 +00:00
Chris Danford cee1f2205c hex <-> binary format string changes from Steve 2006-06-25 05:56:41 +00:00
Chris Danford 37db209bc9 hex <-> binary format string changes from Steve 2006-06-25 05:30:36 +00:00
Chris Danford 304d4c33ae add HexToBinary, move to RageUtil 2006-06-25 04:21:58 +00:00
Chris Danford b44ad7a4e0 preserve language name case in file name if LanguageInfo not available 2006-06-24 16:57:39 +00:00
Glenn Maynard f0b7631e3a use standard name "isfinite", not "finite" 2006-06-15 03:15:41 +00:00
Chris Danford c7124728e0 move song finding to SongUtil 2006-06-13 03:51:18 +00:00
Chris Danford 8a0d3db8dc isfinite -> finite 2006-06-12 22:34:52 +00:00
Steve Checkoway 4dbf1d44ae Have FromString report failure when it read NaN or INF. 2006-06-12 07:58:54 +00:00
Steve Checkoway a45880281a Wrap strtof. Return 0 on nonfinite values. 2006-06-12 06:36:36 +00:00
Glenn Maynard 7e2fd6296a fix conversion 2006-04-24 16:46:55 +00:00
Glenn Maynard f0fd06f92c add ConvertCodepageToWString, ConvertACPToUTF8
change ConvertWstringToACP -> ConvertWstringToCodepage
2006-04-04 23:38:09 +00:00
Chris Danford 865dcb072b remove unnecessary CLAMP in RandomGen 2006-03-28 21:52:10 +00:00
Chris Danford f9d50da5e1 cleanup for easier debugging 2006-03-28 19:15:44 +00:00
Glenn Maynard 514dd69f13 temp revert: this returns [0,n), not [0,n] (fixes crashes) 2006-03-28 12:47:54 +00:00
Chris Danford 6d865d4762 fix RandomGen off by 1. Was retruning.[0,max), not [0,max]. (Caused random courseEntries to never pick the last song in the list) 2006-03-27 21:55:34 +00:00
Glenn Maynard 6b24dd0309 cleanup 2006-03-26 06:09:12 +00:00
Steve Checkoway 5d9ab0982b Fix warnings about possibly being used uninitialized. 2006-03-20 06:09:00 +00:00
Glenn Maynard 579d797374 don't assert on invalid text 2006-03-03 05:27:07 +00:00
Glenn Maynard 89d26b20ae bind case changing 2006-03-03 02:08:46 +00:00
Glenn Maynard f9f990f590 support UTF-8 through ISO-8859-1 in MakeUpper, MakeLower, Capitalize 2006-03-01 02:45:42 +00:00
Glenn Maynard 3d86168ebb g_Uptab -> g_UpperCase 2006-03-01 01:04:02 +00:00
Glenn Maynard d151beec27 g_Uptab values for ISO-8859-1 2006-03-01 00:26:07 +00:00
Glenn Maynard 26e8fbd0ae detach uptab from char_traits_char_nocase 2006-03-01 00:24:25 +00:00
Glenn Maynard 18fbd2e8a4 take a char* for utf8_to_wchar 2006-03-01 00:14:50 +00:00
Glenn Maynard 3a1d3883b5 unsigned 2006-03-01 00:11:59 +00:00
Glenn Maynard fbd9a129ad cleanup 2006-03-01 00:10:12 +00:00
Glenn Maynard 4f1322da92 all else is equal, so we may as well use lowercase; that's what locale
identifiers do (eg. "en_US"), anyway.
2006-02-11 03:45:25 +00:00
Glenn Maynard 7f326ae2cf fix example 2006-02-11 03:41:05 +00:00
Glenn Maynard 00f89eb307 %D -> %0D 2006-02-09 00:08:40 +00:00
Glenn Maynard 478de001c6 move URLEncode into RageUtil 2006-02-09 00:08:10 +00:00
Chris Danford 884b8048f3 RString -> const RString & for easier stepping 2006-02-03 19:23:50 +00:00
Chris Danford f09aee93b8 consistent language capitalization 2006-01-27 08:16:22 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Chris Danford 477e67a8aa fix smpackage file routines and registry writing 2006-01-21 12:18:26 +00:00
Glenn Maynard e39f1499e2 cleanup 2006-01-20 06:07:37 +00:00
Chris Danford 6012947d00 remove ssprintf overload 2006-01-08 05:32:56 +00:00
Chris Danford 32223b6912 adding ssprintf overload for easier use with LocalizedString 2006-01-08 00:40:28 +00:00
Glenn Maynard 8174e0b629 merge RageUtilLua 2005-12-31 06:52:04 +00:00
Chris Danford 2d7ae984e2 fix VC6 compile (braindead std::string?) 2005-12-29 02:36:46 +00:00
Glenn Maynard 5303e7aab9 This isn't right: it'll add a period to the end, even when there was no
extension at all.  Remove it; it wasn't meant to be committed to begin
with.
2005-12-29 02:10:18 +00:00
Steve Checkoway 2985f1a6ec Fix warnings. 2005-12-29 02:03:14 +00:00
Steve Checkoway 451bb4c396 SetExtension does not modify sName. Also, after calling SetExtension( sName, "" ), the period is removed so if the file name is foo.bar.baz, then calling SetExtension with "" followed by "bur" you end up with foo.bur. Instead, just append "." + sExt. 2005-12-29 02:01:10 +00:00
Glenn Maynard 86572cc1f3 add MakeValidFilename 2005-12-29 01:20:33 +00:00
Chris Danford b42d28af34 add language localization tools 2005-12-28 19:21:08 +00:00