powerformula

package
v1.2.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PowerModel

type PowerModel struct {
	Power float64
	Work  float64
	Time  float64
}

PowerModel data model for Power formula

func GetListOfPower

func GetListOfPower(pm []PowerModel) []PowerModel

GetListOfPower process the list of given work and time. Throws an error if the work and time is less than zero

func GetResultingPower

func GetResultingPower(w float64, t float64) (PowerModel, error)

GetResultingPower calculate a single work and time to get the resulting power

func GetTransposeTime added in v1.0.2

func GetTransposeTime(w float64, p float64) (PowerModel, error)

GetTransposeTime calculate the time from work and power

func GetTransposeWork added in v1.0.2

func GetTransposeWork(t float64, p float64) (PowerModel, error)

GetTransposeWork calculates the work from the given time and power

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL