more docs
This commit is contained in:
		
							parent
							
								
									aba122c3e6
								
							
						
					
					
						commit
						823e9a6498
					
				
							
								
								
									
										19
									
								
								docs/math.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								docs/math.md
									
									
									
									
									
								
							@ -22,7 +22,8 @@ Same as in C++.
 | 
			
		||||
: not yet implemented.
 | 
			
		||||
 | 
			
		||||
(1)
 | 
			
		||||
: Shuttle operator: `a <=> b` returns 0 if a == b, negative Int if a < b and positive Int otherwise. It is necessary to override shuttle operator to make a class comparable. 
 | 
			
		||||
: Shuttle operator: `a <=> b` returns 0 if a == b, negative Int if a < b and positive Int otherwise. It is necessary to
 | 
			
		||||
override shuttle operator to make a class comparable.
 | 
			
		||||
 | 
			
		||||
## Operators
 | 
			
		||||
 | 
			
		||||
@ -42,15 +43,14 @@ but:
 | 
			
		||||
The following functions return its argument if it is `Int`,
 | 
			
		||||
or transformed `Real` otherwise.
 | 
			
		||||
 | 
			
		||||
| name     | description                                            |
 | 
			
		||||
|----------|--------------------------------------------------------|
 | 
			
		||||
| floor(x) | Computes the largest integer value not greater than x  |
 | 
			
		||||
| ceil(x)  | Computes the least integer value value not less than x |
 | 
			
		||||
| round(x) | Rounds x                                               |
 | 
			
		||||
| abs(x)   | absolute value, Int for integer x, Real otherwise      |
 | 
			
		||||
|          |                                                        |
 | 
			
		||||
| name           | description                                            |
 | 
			
		||||
|----------------|--------------------------------------------------------|
 | 
			
		||||
| floor(x)       | Computes the largest integer value not greater than x  |
 | 
			
		||||
| ceil(x)        | Computes the least integer value value not less than x |
 | 
			
		||||
| round(x)       | Rounds x                                               |
 | 
			
		||||
| x.roundToInt() | shortcut to `round(x).toInt()`                         |
 | 
			
		||||
 | 
			
		||||
## Mathematical functions
 | 
			
		||||
## Lyng math functions
 | 
			
		||||
 | 
			
		||||
| name      | meaning                                              |
 | 
			
		||||
|-----------|------------------------------------------------------|
 | 
			
		||||
@ -73,7 +73,6 @@ or transformed `Real` otherwise.
 | 
			
		||||
| sqrt(x)   | $ \sqrt {x}$                                         |
 | 
			
		||||
| abs(x)    | absolute value of x. Int if x is Int, Real otherwise |
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
For example:
 | 
			
		||||
 | 
			
		||||
    assert( sin(π/2) == 1.0)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user