Author Topic: [CHALLENGE] Fitted Diagonal Length  (Read 2035 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
[CHALLENGE] Fitted Diagonal Length
« on: December 23, 2009, 09:32:10 PM »
Given :
Container Width
Container Height
Object Thickness

Calculate Object Length which fits into container with corners touching container sides.

enjoy !
source code solution accepted in any language ( even english)  

Refer attachment:

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8662
  • AKA Daniel
Re: [CHALLENGE] Fitted Diagonal Length
« Reply #1 on: December 24, 2009, 08:18:55 AM »
First I would search and copy someone's code :evil:
http://www.theswamp.org/index.php?topic=12578.msg154713#msg154713

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: [CHALLENGE] Fitted Diagonal Length
« Reply #2 on: December 24, 2009, 08:22:53 AM »

bugger !!

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: [CHALLENGE] Fitted Diagonal Length
« Reply #3 on: December 24, 2009, 08:30:31 AM »

My only excuse is :
that was posted before I turned 60, so I can be excused for forgetting about it.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8662
  • AKA Daniel
Re: [CHALLENGE] Fitted Diagonal Length
« Reply #4 on: December 24, 2009, 08:42:12 AM »
I found it while searching for an asin function, it's a good thing too my brain was overloading  :laugh:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: [CHALLENGE] Fitted Diagonal Length
« Reply #5 on: December 24, 2009, 08:48:48 AM »

Well, I'm off to bed ... Santa will be here soon :)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: [CHALLENGE] Fitted Diagonal Length
« Reply #6 on: December 24, 2009, 09:15:52 AM »
I knew I had seen that before. Just could not find it! :?

My attempt follow my past attempts.
Could not get the triangle relations to work so I fell back on the circle method.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.