Skip to content

Commit 455db45

Browse files
committed
Final functions definition and comments
1 parent b334975 commit 455db45

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cachematrix.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ makeCacheMatrix <- function(x = matrix()) {
2424
}
2525

2626

27-
## Return the inverse matrix of the object returned by the above function.
27+
## Return the inverse matrix by calling the functions defined above
2828

2929
cacheSolve <- function(x, ...) {
3030
## Return a matrix that is the inverse of 'x'
31-
invFunc <- x$getInverse()
32-
if(!is.null(invFunc)) {
31+
invFunction <- x$getInverse()
32+
if(!is.null(invFunction)) {
3333
message("getting cached data")
34-
return(invFunc)
34+
return(invFunction)
3535
}
3636
data <- x$get()
37-
invFunc <- solve(data, ...)
38-
x$setInverse(invFunc)
39-
invFunc
37+
invFunction <- solve(data, ...)
38+
x$setInverse(invFunction)
39+
invFunction
4040
}

0 commit comments

Comments
 (0)