Skip to content

Instantly share code, notes, and snippets.

@onurhuseyincantay
Last active January 28, 2020 19:45
Show Gist options
  • Save onurhuseyincantay/c7583785d493c5b42c53df082b934421 to your computer and use it in GitHub Desktop.
Save onurhuseyincantay/c7583785d493c5b42c53df082b934421 to your computer and use it in GitHub Desktop.
import CoreGraphics
// MARK: - Function Documentation
/// Calculates the difference between given points
/// - Parameter pointA: first point
/// - Parameter pointB: second point
/// - Returns: Distance of 2 points as CGFloat
func calculateDistance(from pointA: CGPoint, to pointB: CGPoint) -> CGFloat? { nil }
// TODO: - Add more functions as sample
// MARK: - Variable Documentation
/// Documentation types
enum DocumentationStyle {
/// mark type is for marking spesific places on the code
case mark
/// todo type is for remembering things when we leave the code
case todo
/// function documentation is for explaining the function
case function
}
/// returns the total documentation count.
/// `Default Value is 10`
var totalDocumentationCount: Int = 10
class Documentation {
/**
Initializes a new Docunent with the provided document number.
- Parameters:
- documentNumber: the number of the document
- Returns: A beautiful, brand-new document,
custom-built just for you.
*/
init(documentNumber: Int) {
}
}
// FIXME: - This is already provided as `totalDocumentationCount`
let totalDocuments: CGFloat = 0.9
/**
Sets a document number
## Important Notes ##
1. The number needs to be Odd
2. be sure that its not matching with other document numbers
- Parameter number: document number thats need to change
*/
func setDocumentNumber(with number: Int) {}
/**
Removes a document from the system
- Remark:
There is also a function for adding document
- Precondition:
the document should exist
- Author:
Onur Huseyin Cantay
- Note: Too much documentation
*/
func removeDocument(by number: Int) {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment