Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old Nov 9, 2012, 06:01 PM   #1
farmerdoug
macrumors 6502a
 
Join Date: Sep 2008
programming ifs help.

I'm trying to figure this out but if someone can tell me in the meantime I'd appreciate it.
Can I do this without using rule1 and rule2?
Code:
rule1 = rule2 = 0
			if (obufs[1][row*FOCPLWIDTH + col]/obufs[0][row*FOCPLWIDTH + col] > 1.5) 
				rule1 = 1;
			if (rule1 == 1)
				{
				sum = 0;
				for ( i = -1; i < 2; i++)
					for ( j = -1; j < 2; j++)
						if (!(i == 0 && j == 0))
							sum += obufs[1][(row - i)*FOCPLWIDTH + col - j];
				if (2 * sum/8 < obufs[1][row*FOCPLWIDTH + col])
					rule2 = 1;
					
				}
			if (rule1 == 1 && rule2 == 1)
					obuf[row*FOCPLWIDTH + col] = 0;
				else 
				for (i = 0; i < no_reads; i++) ...
farmerdoug is offline   0 Reply With Quote

 
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Mac programming should be more like iOS programming. moonman239 Mac Programming 13 Feb 17, 2014 02:37 PM
New to Programming swimanole Mac Programming 10 Nov 6, 2012 12:55 PM
Help with C programming. Meitou Mac Programming 2 Sep 21, 2012 02:36 PM
C++ programming jmfel1926 Mac Programming 4 Sep 14, 2012 08:21 PM

Forum Jump

All times are GMT -5. The time now is 12:50 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC