math

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Math added in v2.4.0

type Math struct{}

func New

func New() *Math

New create a Math.

func (*Math) GetCenterCorrection added in v2.4.0

func (s *Math) GetCenterCorrection(outerSize, innerSize float64) float64

GetCenterCorrection return the correction of space in X or Y to centralize a line in relation with another line.

func (*Math) GetInnerCenterCell added in v2.4.0

func (s *Math) GetInnerCenterCell(inner *entity.Dimensions, outer *entity.Dimensions) *entity.Cell

GetInnerCenterCell define a inner cell formatted inside outer cell centered.

func (*Math) Resize added in v2.4.0

func (s *Math) Resize(inner *entity.Dimensions, outer *entity.Dimensions, percent float64, justReferenceWidth bool) *entity.Dimensions

Resize adjusts the internal dimension of an element to occupy a percentage of the available space

  • inner: The inner dimensions of the element
  • outer: The outer dimensions of the element
  • percent: The percentage of the external dimension that can be occupied
  • justReferenceWidth: Indicates whether resizing should be done only in relation to width or in relation to width and height

Jump to

Keyboard shortcuts

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