Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=alastairs-place.net; h=cc: message-id:from:to:in-reply-to:content-type: content-transfer-encoding:mime-version:subject:date:references; q= dns/txt; s=aug07; bh=5qh8pWkni2u+E9d5ttcT8F8a2VU=; b=cDNG5fBQjRk PHjv54JlJvkXBAbQtH3Ms1VPjpuSe/wroXwXnMPp2/vyNZJgSKWGIxvcsYexOeqV bwmR/aoK9EqBhButxAFubB5mLWSwUK2u12m7mNtpck54xjNIn2zUg9HyBA+GL6k1 0wib8wcj16j1Gd/aL9XbAEYsSyyPlg1g= On 30 Sep 2008, at 12:59, Michael Robinson wrote: Thanks for your incredibly swift replies! Kind regards, Alastair. -- http://alastairs-place.net _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... changing "float retVal" to "double retVal", using "return lround(retVal);" and casting ints as doubles in the formula gave me some real values, which is wonderful! I could have saved myself two hours by asking the list when I first ran into this problem! I've got it spitting out some (jagged but acceptable) corners now, which is wonderful. In case any of you were interested, I'm doing this to create an HTML "object" that can be placed over any background, be given rounded corners and have the background show through. It was being accomplished with Javascript, but I figured it'd be better if this was done one time, when the HTML is generated, instead of at client side. If you're rendering this in advance using Cocoa, why not use the - appendBezierPathWithArcFromPoint:toPoint:radius: method on NSBezierPath to construct a rounded path? This email sent to site_archiver@lists.apple.com
participants (1)
-
Alastair Houghton