Skip to content

Commit

Permalink
NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustRush committed May 10, 2017
1 parent 377a409 commit 55d17e6
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/DynamicItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ final class DynamicItem<T: Vectorial>: NSObject, UIDynamicItem {
let curZ = fromR.three + change.z * progress;
let curW = fromR.four + change.w * progress;

let rect = Vector4.init((curX,curY,curZ,curW))
let rect = Vector4.init((curX.isNaN ? 0 : curX,curY.isNaN ? 0 : curY,curZ.isNaN ? 0 : curZ,curW.isNaN ? 0 : curZ))
var curV = from.convert(rect)
if progress >= 1.0 {
if boundaryLimit {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Value+Physical.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ extension CGSize: Physical {

public func reverse() -> Vector4 {
let vector = Vector4()
vector.one = Double(self.width)
vector.two = Double(self.height)
vector.one = Double(width)
vector.two = Double(height)
return vector
}

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,69 @@
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../Sources/UIView+AnimateBehavior.swift"
timestampString = "516080855.671354"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "220"
endingLineNumber = "220"
landmarkName = "createDynamicBehavior(withStyle:subType:step:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../Sources/UIView+AnimateBehavior.swift"
timestampString = "516081029.441423"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "150"
endingLineNumber = "150"
landmarkName = "createDynamicBehavior(withStyle:subType:step:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../Sources/UIView+AnimateBehavior.swift"
timestampString = "516081185.726804"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "223"
endingLineNumber = "223"
landmarkName = "createDynamicBehavior(withStyle:subType:step:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../Sources/DynamicItem.swift"
timestampString = "516081338.922453"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "27"
endingLineNumber = "27"
landmarkName = "init(from:to:render:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

0 comments on commit 55d17e6

Please sign in to comment.