-1
votes
2answers
23 views

Round an integer in increments of 5

I want to increment an integer value in increments of 5. Examples would be: 233 to 235, 437 to 435, and say a corner case such as 298 to 300. I feel like I should divide by 5. Edit: Very sorry for ...
-1
votes
2answers
35 views

Objective-c: map a range

I have a variable with values ranging from 0 to 4000, but need to convert the value so it outputs 0 to 1 instead. In arduino, there's a function called, map: map(value, fromLow, fromHigh, toLow, ...
0
votes
0answers
62 views

calculate the distance between two point from iPhone Camera [closed]

i want to calculate the distance between two point from iPhone camera. i am explain you that what i want. Suppose i am standing with my iPhone (with camera on) 10 feet far from the object. So my two ...
-3
votes
0answers
28 views

How do i make a search for only specific letters in a proposition

I have this phrase: aawwaaazzeezzzee. I need to make a search that returns: if the letter a has been grouped(aa) 2 times show how many times. if the letter a has been grouped(aaa) 3 times show how ...
3
votes
1answer
96 views

Calculus to convert Y coordinates for purpose of updating bpm in a metronome

I'm in the course of developing a metronome for iPad. I'm using CGAffineTransformRotate for the metronomeArm animation, NSTimer(I'm not interested in great precision) for sound and a ...
2
votes
0answers
53 views

Simplifying a fraction with decimals for ratio calculation [duplicate]

Assume I want to calculate a ratio equality... So, a c --- == --- b d Where a = 1.2, b = 2.4, d = 5.3 I know how to solve the equation (cross multiply and divide) easily; however, I ...
-10
votes
3answers
119 views

Calculate the sum of numbers between 1 and 100 that end in 5 [closed]

I'm trying to calculate the sum of all the numbers between 1 and 100, but only those numbers that end in 5: 5, 15, 25, and so on. I have no idea how to do this; I know how to calculate a sum, but not ...
0
votes
1answer
127 views

Check if any values have changed a certain amount

Does anyone know any efficient ways to check if any set of integers contains an integer that has changed by a certain amount. For example I have: int1 = 10; int2 = 20; int3 = 30; And I want to ...
0
votes
3answers
54 views

How to pick a line closest to the center on a grid?

I am drawing a simple grid, and I want the line closest to the center of the screen to be highlighted a different color. What is the formula to determine what line was drawn that closely resembles ...
0
votes
3answers
91 views

Calculate Latitude and longitude more between Latitude/Longitude points?

Latitude: 22.744812, Longitude: 75.892578 The above would be considered my center point. And now I need to determine the latitude and longitude points from center point 1000 meter outward to each ...
0
votes
1answer
50 views

Calculate Distance Forumla while using a Scale

I am trying to calculate a distance based upon the scale my users draws in. My user can snap to other points in the game by drawing a line on a grid. The grid is a numerical value that they can ...
0
votes
1answer
85 views

Distance between two points on circle in specific direction

I have two points on my circle, (x1y1) and (x2y2). How do I calculate distance between them in counter and clock wise direction. Currently, I am using following formula to calculate the distance ...
0
votes
1answer
44 views

Incorrect Points in Circumference

I am trying to calculate points in a circumference and I do not get expected values. I am calculating it like this: - (NSMutableArray *) pointsForSegment:(int) segment { NSLog(@"segment is %d", ...
0
votes
1answer
98 views

Enumerating all possible permutations in objective c -xcode

I want to have my program loop over all possible combinations of something like 5c1,5c2,5c3 etc and calculate some things within the loop. Something like 5c1 -> 1,0,0,0,0 0,1,0,0,0 0,0,1,0,0 ...
0
votes
1answer
66 views

Why isn't my curved text centering itself?

I have a UIView subclass called dpCurvedLabel. It uses CATextLayers to curved text around an arc. It works fine, except that I can't get it perfectly centered in the layers parent view. I want the ...

1 2 3 4 5 17
15 30 50 per page