MCPcopy Create free account
hub / github.com/EngoEngine/engo / AddScalar

Method AddScalar

math.go:82–86  ·  view source on GitHub ↗

AddScalar adds s to each component of p

(s float32)

Source from the content-addressed store, hash-verified

80
81// AddScalar adds s to each component of p
82func (p *Point) AddScalar(s float32) *Point {
83 p.X += s
84 p.Y += s
85 return p
86}
87
88// SubtractScalar subtracts s from each component of p
89func (p *Point) SubtractScalar(s float32) *Point {

Callers 5

SubtractScalarMethod · 0.95
TestPointScalarAdditionFunction · 0.95
TestPointMethodChainFunction · 0.80
UpdateMethod · 0.80
UpdateMethod · 0.80

Calls

no outgoing calls

Tested by 2

TestPointScalarAdditionFunction · 0.76
TestPointMethodChainFunction · 0.64