playMaker

Author Topic: Find nearest float in float array.  (Read 1920 times)

gsmetzer

  • Playmaker Newbie
  • *
  • Posts: 24
Find nearest float in float array.
« on: November 06, 2014, 08:39:52 PM »
I have an array of floats and I need to get the nearest float in that array compared to another float variable.  For example:
Float Array
1.46
3.67
4.68
7.78
8.54
My Float Variable is: 3.56
Answer is: 3.67 (the array)

How can I implement this with playmaker that is simple?  Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Find nearest float in float array.
« Reply #1 on: November 24, 2014, 02:47:09 AM »
Hi,

 ok, please find an action attached  that you need to use with ArrayMaker.

The coming up version of PlayMaker will have build in arrays, and so you will not need ArrayMaker anymore, but a new custom action will be necessary. Simply bump this and I'll make one.

 Bye,

 Jean