1. Avoiding if else by max of min:
e.g., if (x-CONST_1 < 0) y = CONST_2 else y = x-CONST_1
=> max(1,x-CONST_1)
condition CONST_2 > x-CONST_1
e.g., if (x+CONST_1 > CONST_3) y = CONST_4 else y = x+CONST_1
=> min(CONST_4,x+CONST_1)
condition CONST_4 < x+CONST_1
2.
Subscribe to:
Post Comments (Atom)
-
To install pngwrite we need to install to helper library before we install pngwriter. 1. libpng 2. freetype2 We can use fink or macport to i...
-
"By creating a graph of Cipolla's two factors, we obtain four groups of people. Helpless people contribute to society but are...
-
Use 'Disk Utility' application to format the USB drive in MS-DOS (FAT) format Download the windows ISO file from the Windows websit...
No comments:
Post a Comment