<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ceil() and floor() functions not working properly in Fusion Support Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879410#M182029</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your parameter, you are applying floor to a value that has units. That is not allowed, as per the chart above. Floor works with ul "unitless" values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to use floor in an expression for a parameter that has units, you simply need to include a nested function that removes the mm units before using floor. See if this works for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="using_Floor.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/479732i0FDB05BB37DFE58C/image-size/large?v=v2&amp;amp;px=999" role="button" title="using_Floor.png" alt="using_Floor.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if you have more questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Fri, 23 Mar 2018 16:37:56 GMT</pubDate>
    <dc:creator>Phil.E</dc:creator>
    <dc:date>2018-03-23T16:37:56Z</dc:date>
    <item>
      <title>ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7797748#M182023</link>
      <description>&lt;P&gt;The ceil() and floor() functions aren't working properly (see "test" and "ceiltest" below).&amp;nbsp; The correct value for ceiltest should be 11 but instead it is evaluated to 20.&amp;nbsp; A similar problem exists for the floor() function.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="function.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/465970i5A1DA39E99DA236C/image-size/large?v=v2&amp;amp;px=999" role="button" title="function.jpg" alt="function.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 01:48:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7797748#M182023</guid>
      <dc:creator>khackbarth</dc:creator>
      <dc:date>2018-02-22T01:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7797806#M182024</link>
      <description>&lt;P&gt;I receive the same error only if I use a variable for the argument and only in the "ceiling" function, "floor" works OK in both instances.&amp;nbsp; Ceiling works if your apply it directly to the value minus the units.&amp;nbsp; The units are picked up from the Units column.&amp;nbsp; You should report this a a bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ceiling Test.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/465980i00702B88961DEA04/image-size/large?v=v2&amp;amp;px=999" role="button" title="Ceiling Test.jpg" alt="Ceiling Test.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 02:38:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7797806#M182024</guid>
      <dc:creator>jhackney1972</dc:creator>
      <dc:date>2018-02-22T02:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7800097#M182025</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks this is a bug, sort of. It should reject any use of units, which is the bug. We'd like to make it work with units rather than rejecting them, or acting in a confusing manner as it does today.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the &lt;A href="http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-76272551-3275-46C4-AE4D-10D58B408C20" target="_blank"&gt;documentation for parameters&lt;/A&gt;, it lists ceil and floor as accepting "unitless" or "ul".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="expects_unitless.png" style="width: 636px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/466308i6814A980304B4CC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="expects_unitless.png" alt="expects_unitless.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Sorry for any confusion, please let me know if you have more questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 15:49:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7800097#M182025</guid>
      <dc:creator>Phil.E</dc:creator>
      <dc:date>2018-02-22T15:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7878624#M182026</link>
      <description>&lt;P&gt;I'm experiencing the same problem. The floor function is rounding to cm when I am working in mm. The docs describes the function as rounding to the nearest whole number, so it is intended to behave independently of units. The problem is it is not, either because of a bug or some sort of setting that is not obvious to me (which is also a "bug"... kinda).&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 13:23:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7878624#M182026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-23T13:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879023#M182027</link>
      <description>&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;Hi and welcome to the Fusion 360 forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The image I posted above shows that currently these functions only support "ul" (which is unitless) units. Can you work your equations to find the ceil and floor values outside of mm/cm units, and then apply the units to the result using another parameter?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad to help if you have a question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:00:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879023#M182027</guid>
      <dc:creator>Phil.E</dc:creator>
      <dc:date>2018-03-23T15:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879189#M182028</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you miss understand what I am saying, so I will clarify: the floor function is returning to the next lowest cm.&amp;nbsp;It is &lt;STRONG&gt;NOT&lt;/STRONG&gt; returning the "next lowest whole number" (or more specifically round down to the nearest lower integer).&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;So the floor function&amp;nbsp;&lt;STRONG&gt;MUST&lt;/STRONG&gt; be&amp;nbsp;taking the units into account somewhere along the line in spite of how it is described. Please see screen shot attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My equation is &lt;STRONG&gt;&lt;EM&gt;floor(d5 * 1.5)&lt;/EM&gt;&lt;/STRONG&gt; where d5 is 9.02mm and the result is 10.0 (ie 10mm or 1 cm) where the expected result is 13 ( floor of 13.53).&lt;/P&gt;&lt;P&gt;Work around: &lt;STRONG&gt;&lt;EM&gt;floor(d5 * 15) / 10&lt;/EM&gt;&lt;/STRONG&gt; which results in 13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So something is wrong. Either the function is not returning a value as described, or the description of the function is incorrect, or possibly I simply don't understand the description (which is somewhat unlikely, I write code for a living, I am using Fusion for expanding on a hobby into maybe something more).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:44:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879189#M182028</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-23T15:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879410#M182029</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your parameter, you are applying floor to a value that has units. That is not allowed, as per the chart above. Floor works with ul "unitless" values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to use floor in an expression for a parameter that has units, you simply need to include a nested function that removes the mm units before using floor. See if this works for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="using_Floor.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/479732i0FDB05BB37DFE58C/image-size/large?v=v2&amp;amp;px=999" role="button" title="using_Floor.png" alt="using_Floor.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if you have more questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:37:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879410#M182029</guid>
      <dc:creator>Phil.E</dc:creator>
      <dc:date>2018-03-23T16:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879453#M182030</link>
      <description>&lt;P&gt;Thank you for the explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suggest that the documentation is adjusted to explain this (because it doesn't to anyone who doesn't work at Autodesk), unitless tells me that that unit is irreverent and will get stripped because the documentation tells me it will return an integer. It doesn't tell me that it will round my argument to a unit of measurement that may or may not be the one I entered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I also suggest that the bug that you are pretending doesn't exist (it rounds to a measurement unit when it is presented with an argument that is a measurement: that doesn't happen out of nowhere) in that function gets corrected. Both of those steps would help usability.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:51:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879453#M182030</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-23T16:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879590#M182031</link>
      <description>&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually, I said it's a bug in the posts above. "&lt;SPAN&gt;It should reject any use of units, which is the bug." This was logged a while ago as a bug. (internal reference FUS-21937)&amp;nbsp;Another possible solution would be to allow use of units, but that is a much larger project for us. Sorry for any confusion about that.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you look at the chart it shows one column as "Expected Type" (which means "this expects you to feed it unitless values") and one column as "Return Type"(which means "this returns unitless values to you"). Is there a label that you would expect to make that more clear? I'm glad to log a suggestion to the web team.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-23 at 10.20.04 AM.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/479753iE3DFE3DB616BA687/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-03-23 at 10.20.04 AM.png" alt="Screen Shot 2018-03-23 at 10.20.04 AM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks again for your feedback and help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 22:53:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879590#M182031</guid>
      <dc:creator>Phil.E</dc:creator>
      <dc:date>2018-05-04T22:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879656#M182032</link>
      <description>&lt;P&gt;... the bug I am pointing out is not the one you had acknowledged...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The software is great, but clearly the corporate culture for accountability is not so great. I will stick to the software and be done chasing my tail with you.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 17:53:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879656#M182032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-23T17:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879705#M182033</link>
      <description>&lt;P&gt;Sorry to make you feel that way. I'm trying to be responsive, open and transparent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the spirit of that, here is the key text from the bug report logged &amp;nbsp;a few months ago. Our plan from day one with this issue is to fix exactly what you are complaining about. My own (irrelevant) opinion was posted above, that the expression should show an error if it is in fact (currently) unacceptable syntax. I think both ideas are not exclusive or incorrect, but that is only my opinion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One possible solution would be to fix it in two stages, first by properly blocking "bad" syntax, and next by the longer term project of making it work with units.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, sorry for any bad feelings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(from the bug report)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"However, as we tested, they do accept values with either unitless or unit, which brings confusion. For example, if the following user parameter (test1, test2, etc) has mm as unit. We can see the evaluated results are kind of unexpected, especially for "floor (5.55mm) = 0 mm"&lt;/P&gt;
&lt;P&gt;test1 = floor(5.55 mm) = 0 mm&lt;BR /&gt;test2 = floor(5.55 cm) = 50 mm&lt;BR /&gt;test3 = floor(5.55 dm) = 550 mm&lt;BR /&gt;test4= floor(5.55) = 5 mm&lt;/P&gt;
&lt;P&gt;It seems the floor function is trying to convert other units to cm then rounding. (The underlying length unit in Fusion is cm.) The rounding is based on its corresponding cm value, i.e. floor (5.55mm) = floor (0.555cm) = 0 cm = 0 mm&lt;/P&gt;
&lt;P&gt;Expected result:&lt;BR /&gt;If the functions accept value with unit, the rounding should be based on the unit of the user parameter, instead of cm."&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 18:09:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7879705#M182033</guid>
      <dc:creator>Phil.E</dc:creator>
      <dc:date>2018-03-23T18:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: ceil() and floor() functions not working properly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7981608#M182034</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;FYI the fix for the bug was to allow units in expressions with ceil() and floor() and also (as you pointed out) correctly use those units. The fix has been tested and barring any unforeseen issues should be available in an upcoming update. Thanks for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 23:03:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/ceil-and-floor-functions-not-working-properly/m-p/7981608#M182034</guid>
      <dc:creator>Phil.E</dc:creator>
      <dc:date>2018-05-04T23:03:24Z</dc:date>
    </item>
  </channel>
</rss>

