Skip to content

Commit

Permalink
Update camera.go Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
setanarut authored Nov 9, 2024
1 parent 5810f7c commit 7d7d907
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions camera.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ type Camera struct {

// If LerpEnabled is true, the camera moves with linear interpolation.
//
// The default value is false
// The default value is false.
LerpEnabled bool

// LerpSpeed ​​is the interpolation speed in the range [0-1].
//
// The default value is 0.1.
Expand All @@ -36,6 +37,7 @@ type Camera struct {
//
// The default value is false
ShakeEnabled bool

// ShakeOptions holds the camera shake options.
ShakeOptions *CameraShakeOptions

Expand Down Expand Up @@ -165,7 +167,7 @@ func (cam *Camera) LookAt(targetX, targetY float64) {
}
}

// AddTrauma adds trauma. factor is in the range [0-1]
// AddTrauma adds trauma. Factor is in the range [0-1]
func (cam *Camera) AddTrauma(factor float64) {
if cam.ShakeEnabled {
cam.trauma = clamp(cam.trauma+factor, 0, 1)
Expand All @@ -189,12 +191,16 @@ func (cam *Camera) Center() (X float64, Y float64) {
return center.X, center.Y
}

// ActualAngle returns camera rotation angle (including the angle of trauma shaking.). The unit is radian.
// ActualAngle returns camera rotation angle (including the angle of trauma shaking.).
//
// The unit is radian.
func (cam *Camera) ActualAngle() (angle float64) {
return cam.actualAngle
}

// Angle returns camera rotation angle (The angle of trauma shake is not included.). The unit is radian.
// Angle returns camera rotation angle (The angle of trauma shake is not included.).
//
// The unit is radian.
func (cam *Camera) Angle() (angle float64) {
return cam.angle
}
Expand All @@ -209,7 +215,7 @@ func (cam *Camera) Width() float64 {
return cam.w
}

// Width returns height of the camera
// Height returns height of the camera
func (cam *Camera) Height() float64 {
return cam.h
}
Expand Down

0 comments on commit 7d7d907

Please sign in to comment.