Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • \$\begingroup\$ Try (int)System.Math.Floor(10-v/a/70) or just (int)(10-v/a/70). \$\endgroup\$ Commented Aug 17, 2016 at 13:16
  • \$\begingroup\$ @Neil Looks like I had to leave the 70d alone but works better thanks \$\endgroup\$ Commented Aug 17, 2016 at 13:44
  • 1
    \$\begingroup\$ Sorry, didn't see the d there. \$\endgroup\$ Commented Aug 17, 2016 at 15:07
  • \$\begingroup\$ Another answer that could save one byte with currying, I think: v=>a=> \$\endgroup\$ Commented Aug 18, 2016 at 3:10
  • \$\begingroup\$ @BrianMcCutchon Didn't even realise how I could do it in C# thanks \$\endgroup\$ Commented Aug 18, 2016 at 8:11