• 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
How to implement float min(float x, ...) ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to implement float min(float x, ...) ?


  • Subject: How to implement float min(float x, ...) ?
  • From: "Oleg Krupnov" <email@hidden>
  • Date: Mon, 17 Nov 2008 09:38:39 +0200

I apologize, this is plain old C, not Cocoa-specific question, but the
fastest way to get the answer.

I want to create a function that finds the minimum out of a
variable-length list of simple float arguments. In other words, I want
this function:

float min(float x, ...);

Can anyone suggest the implementation?

I have read this: http://developer.apple.com/qa/qa2005/qa1405.html
but it seems to address arguments of type "id", not sure it will work
for simple integral types like float.

Thanks!
_______________________________________________

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: How to implement float min(float x, ...) ?
      • From: Peter Ammon <email@hidden>
    • Re: How to implement float min(float x, ...) ?
      • From: "Chris Holloway" <email@hidden>
    • Re: How to implement float min(float x, ...) ?
      • From: Peter N Lewis <email@hidden>
    • Re: How to implement float min(float x, ...) ?
      • From: Roland King <email@hidden>
    • Re: How to implement float min(float x, ...) ?
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Writing a more usable AppleEvent logger
  • Next by Date: Re: How to implement float min(float x, ...) ?
  • Previous by thread: Re: Writing a more usable AppleEvent logger
  • Next by thread: Re: How to implement float min(float x, ...) ?
  • Index(es):
    • Date
    • Thread