サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
ノーベル賞
martin.ankerl.com
Creating random colors is actually more difficult than it seems. The randomness itself is easy, but aesthetically pleasing randomness is more difficult. For a little project at work I needed to automatically generate multiple background colors with the following properties: Text over the colored background should be easily readable Colors should be very distinct The number of required colors is no
Usually microoptimization is only done in C or C++, but it works quite well in Java too. For a project I needed very fast log() and exp() calculations, and Java’s Math.log() and Math.exp() just doesn’t cut it. After a bit of research I have found the following approximations that are good enough for me: UPDATE This pow() approximation is obsolete. I have a much faster and more accurate approximati
Optimized pow() approximation for Java, C / C++, and C# I have already written about approximations of e^x, log(x) and pow(a, b) in my post Optimized Exponential Functions for Java. Now I have more In particular, the pow() function is now even faster, simpler, and more accurate. Without further ado, I proudly give you the brand new approximation: Approximation of pow() in Java public static double
このページを最初にブックマークしてみませんか?
『martin.ankerl.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く