mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 16:03:22 +01:00
Add write-sine-curves.ps1
This commit is contained in:
parent
5a712d7240
commit
c72dfb2c23
23
Scripts/write-sine-curves.ps1
Normal file
23
Scripts/write-sine-curves.ps1
Normal file
@ -0,0 +1,23 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Write sine curves
|
||||
.DESCRIPTION
|
||||
This PowerShell script writes sine curves.
|
||||
.EXAMPLE
|
||||
PS> ./write-sine-curves
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
0..1000 | foreach {
|
||||
$Value = [int](40 * [math]::sin($_ / 10))
|
||||
if ($Value -gt 0) {
|
||||
$Line = " "*60+"*"*$value
|
||||
} else {
|
||||
$Line = " "*(60-(-1*$value))+"*"*($value*-1)
|
||||
}
|
||||
Write-Host $Line
|
||||
Start-Sleep -milliseconds 50
|
||||
}
|
Loading…
Reference in New Issue
Block a user