Skip to content

Commit

Permalink
Fix possible zero stride error (Closes #981)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed May 2, 2016
1 parent 92f20fe commit 1d9d51e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Charts/Classes/Renderers/ChartYAxisRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public class ChartYAxisRenderer: ChartAxisRendererBase
let last = interval == 0.0 ? 0.0 : ChartUtils.nextUp(floor(Double(yMax) / interval) * interval)

var n = 0
if interval != 0.0
if interval != 0.0 && last != first
{
for _ in first.stride(through: last, by: interval)
{
Expand Down

5 comments on commit 1d9d51e

@liuxuan30
Copy link
Member

@liuxuan30 liuxuan30 commented on 1d9d51e May 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to change ChartYAxisRendererRadarChart's portion?
I see same pattern, not sure if radar chart will have a chance that interval == 0.0?

                if (first == 0.0)
                { // Fix for IEEE negative zero case (Where value == -0.0, and 0.0 == -0.0)
                    first = 0.0
                }

                let last = ChartUtils.nextUp(floor(Double(yMax) / interval) * interval)

                var n = 0
                for _ in first.stride(through: last, by: interval)
                {
                    n += 1
                }

@andymedvedev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, i see that you fixed it but when i use "pod install" i see in that file only these lines of code:
2016-05-17 16 20 54
and no "if" statement

@danielgindi
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are installing the latest release, not the latest code on master

@andymedvedev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok , but how to install latest code on master? Thanks in advance.

@liuxuan30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andertsk would be able to build the framework(if you are using) based on master?

Please sign in to comment.