mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-06 05:37:48 +00:00
addfloatmembers
- added '-decimals' param, default 2 prelim manual testing passes
This commit is contained in:
parent
dd38cf4bc2
commit
8f49403555
@ -16,12 +16,13 @@ function AddBoolMembers () {
|
||||
|
||||
function AddFloatMembers () {
|
||||
param(
|
||||
[String[]]$PARAMS
|
||||
[String[]]$PARAMS,
|
||||
[int]$decimals = 2
|
||||
)
|
||||
[hashtable]$Signatures = @{}
|
||||
foreach ($param in $PARAMS) {
|
||||
# Define getter
|
||||
$Signatures['Getter'] = "[math]::Round(`$this.Getter('{0}'), 1)" -f $param
|
||||
$Signatures['Getter'] = "[math]::Round(`$this.Getter('{0}'), {1})" -f $param, $decimals
|
||||
# Define setter
|
||||
$Signatures['Setter'] = "param ( [Single]`$arg )`n`$this.Setter('{0}', `$arg)" `
|
||||
-f $param
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user