Documentation ¶
Overview ¶
Copyright 2020...2021 Adam Lavrik <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020...2021 Adam Lavrik <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020...2021 Adam Lavrik <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func DivMod(dividend, divisor T) (T, T)
- func Is2Power(value T) bool
- func IsOdd(value T) bool
- func MinMax(value_0, value_1 T) (T, T)
- func MinMaxSlice(values []T) (T, T)
- func MinMaxSliceChecked(values []T) (T, T, bool)
- func MinMaxs(value T, values ...T) (T, T)
- func Pow(base int, exponent uint) int
- type T
- func Abs(value T) T
- func Copysign(target, source T) T
- func Fibonacci(index int) T
- func Max(value_0, value_1 T) T
- func MaxSlice(values []T) T
- func MaxSliceChecked(values []T) (T, bool)
- func Maxs(value T, values ...T) T
- func Min(value_0, value_1 T) T
- func MinSlice(values []T) T
- func MinSliceChecked(values []T) (T, bool)
- func Mins(value T, values ...T) T
- func Sign(value T) T
- func SignBit(value T) T
- type UT
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func MinMaxSlice ¶
Types ¶
type T ¶
type T = int
func Fibonacci ¶
Fibonacci(index) returns Fibonacci sequence member with corresponding index: - Fibonacci(0) == 0 - Fibonacci(1) == Fibonacci(2) == 1 - Fibonacci(3) == 2 - Fibonacci(4) == 3 ... Negative indexes produce results, extended for negative values: - Fibonacci(-1) == 1 - Fibonacci(-2) == -1 - Fibonacci(-3) == 2 - Fibonacci(-4) == -3 ... Result is calculated via matrix ((1, 1), (1, 0)) fast raising to `index` power.