• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Weird CGFloat issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird CGFloat issue


  • Subject: Weird CGFloat issue
  • From: Gideon King <email@hidden>
  • Date: Mon, 19 Apr 2010 03:26:37 +1000

Hi all,

I'm having a really strange problem with a simple method call:

CGFloat newMin = 150.0f;
CGFloat newMax = 0.0f;
[mapContentSubview setMinDimension:newMin andMaxDimension:newMax];

The method is defined as:

- (void)setMinDimension:(CGFloat)newMinDimension andMaxDimension:(CGFloat)newMaxDimension;

But when I look at what's coming in as the new min dimension, it is 807.000122, and not 150.0 as expected.

If I call it like this:

[mapContentSubview setMinDimension:150.0f andMaxDimension:newMax];

or

[mapContentSubview setMinDimension:150.0 andMaxDimension:newMax];

the min dimension value at the other end is 5.5607842581234111e-315.

I'm sure there is just some simple typing problem, but I'm just not seeing it.

Any ideas?


Thanks

Gideon



_______________________________________________

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

  • Follow-Ups:
    • Re: Weird CGFloat issue
      • From: Raffael Cavallaro <email@hidden>
    • Re: Weird CGFloat issue
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: scrollPoint: and smooth scrolling depend on current modifierFlags?
  • Next by Date: Re: program termination after releasing self defined NSXMLParser class
  • Previous by thread: scrollPoint: and smooth scrolling depend on current modifierFlags?
  • Next by thread: Re: Weird CGFloat issue
  • Index(es):
    • Date
    • Thread