Skip to content

Commit 175b925

Browse files
committed
tidied comments up abit
1 parent 4927e65 commit 175b925

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

cachematrix.R

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# WEEK3 ~ ASSIGNMENT
2-
# by John Barker
2+
# by battez
33
# cachematrix.R
44
# Pair of functions which cache the inverse of a matrix.
55
# example usage:
66
# cacheSolve(makeCacheMatrix(x = someInvertibleMatrix))
77
#
8-
# The first function, makeCacheMatrix creates a special "matrix" object, makes a function to
8+
# The first function, makeCacheMatrix creates a special "matrix" object, returning a list with
9+
# functions to
910
# set - the value of the matrix & reset cache
1011
# get - the value of the matrix object
1112
#
12-
# set - the value of the matrix that is the inverse of matrix x
13-
# get - ditto
13+
# setinverse - sets the value of the matrix that is the inverse of matrix x
14+
# getinverse - gets the value of the matrix that is the inverse of matrix x
1415
#
1516
makeCacheMatrix <- function(x = matrix()) {
1617

@@ -30,8 +31,8 @@ makeCacheMatrix <- function(x = matrix()) {
3031
# simple getting of x.
3132
get <- function() x
3233

33-
# function that sets i (again, looks in another environment) to the "solved" passed
34-
setinverse <- function(solved) i <<- solved
34+
# function that sets i to the "solved" passed to it
35+
setinverse <- function(solved) i <<- solved
3536

3637
# returns the inverse
3738
getinverse <- function() i

0 commit comments

Comments
 (0)