Math question
Math question
- Subject: Math question
- From: "Eric E. Dolecki" <email@hidden>
- Date: Tue, 24 Jan 2017 18:45:09 +0000
I have a situation where the distance of an onTouchesBegan in iOS produces
a scale for an object.
min distance of 100 = scale of 1.0
max distance of 200 = scale of 3.0
So I am looking for a number between 100 and 200 which ends up being
between 1.0 and 3.0. I can get the distance easily enough, but the scale
factor eludes me at the moment. Coffee? Lack of this kind of math for over
20 years? Heh.
self.scaleCircle.transform = CGAffineTransform(scaleX: percentage, y:
percentage)
What math would I apply to get that range?
Eric
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden